<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<%@ taglib uri="/WEB-INF/tld/sys.tld" prefix="sys" %>
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>项目评审流程附加信息</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
<div class="Wrapper">
	<form id="formSet1">
		<div class="fieldset1 tabel_col clearFix">
			<div class="caption">
				<span class="title">项目发起人信息</span>
			</div>
			<div class="fieldBox col_33">
				<div class="label">客户经理</div>
				<div class="field">
					<c:if test="${isDetail==0 }">
						<a href="javascript:toMgrPrjBscInfoPage()" class="sq-button-hasicon link">
						<i class="sqBtnIco_1"></i>
						</a>
					&nbsp;&nbsp;
					</c:if>
					<span name="cstMgrNm" id="cstMgrNm">&nbsp;</span>
					<input type="hidden" name="cstMgrId" id="cstMgrId" />
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">联系方式</div>
				<div class="field">
					<span name="mp" id="mp">${mp }&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">所属机构</div>
				<div class="field">
					<span name="cstMgrOrgCdNm" id="cstMgrOrgCdNm">&nbsp;</span>
				</div>
			</div>
			<div class="caption">
				<span class="title">承租人信息</span>
			</div>
			<div class="fieldBox col_50">
				<div class="label">承租人姓名</div>
				<div class="field">
					<div id="recsttyp1" style="display: none;">
						<a href="javascript:toRePrjPage('reCstNm','cstNm')" class="sq-button-hasicon link">
							<i class="sqBtnIco_1"></i>
						</a>
						&nbsp;&nbsp;
					</div>
					<div id="recsttyp2" style="display: none;">
						<a href="javascript:toRePrjPage('reWorkPlc','cstNm')" class="sq-button-hasicon link">
							<i class="sqBtnIco_1"></i>
						</a>
						&nbsp;&nbsp;
					</div>
					
					<a href="javascript:showCustomerDetail()" class="link">
						<span name="cstNm" id="cstNm">&nbsp;</span>
					</a>
					<input type="hidden" id="cstId" name="cstId">
					<input type="hidden" id="cstTypCd" name="cstTypCd">
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">承租人实际区域</div>
				<div class="field">
					<jsp:include page="../../system/sysRegion/region.jsp" flush="true">
						<jsp:param name="regionShowLvl" value="1" />
					</jsp:include>
				</div>
			</div>
			<c:if test="${buOrgCd==00000013 }">
				<div class="fieldBox col_50">
					<div class="label">客户级别</div>
					<div class="field">
						<span name="cstLvlCdNm" id="cstLvlCdNm">${cstLvlCdNm }&nbsp;</span>
					</div>
				</div>
			</c:if>
			<c:if test="${showCstLvl == 1 }">
				<div class="fieldBox col_50">
					<div class="label">客户等级</div>
					<div class="field">
						<select name="cstLvlCd" id="cstLvlCd" data-value="${cstLvlCd }">
							<option value=" " checked >请选择</option>
							<c:forEach items="${cstLvlCdList }" var="kv" begin="0" step="1" varStatus="status">
								<option value="${kv.key }">${kv.value }</option>
							</c:forEach>
	       				</select>
	       				<input id="cstId" name="cstId" value="${cstId}" type="text" style="display: none;">
	       				<c:if test="${saveCstLvl == 1 }">
	       					<span id="saveCstLvlCd" class="sq-button sq-button-round" onclick="saveCstLvlCd();">保存</span>
	       				</c:if>
					</div>
				</div>
			</c:if>
			<div id="marStsCdNmDIV" class="fieldBox col_50">
				<div class="label">承租人婚姻状况</div>
				<div class="field">
					<span name="marStsCdNm" id="marStsCdNm">&nbsp;</span>
				</div>
			</div>
			<div id="rlNmDIV" class="fieldBox col_50">
				<div class="label">承租人配偶姓名</div>
				<div class="field">
					<c:if test="${isDetail==0 }">
						<div id="rlNmReDiv" >
							<a href="javascript:toRePrjPage('reCstNm','rlNm')" class="sq-button-hasicon link">
							<i class="sqBtnIco_1"></i>
							</a>
							&nbsp;&nbsp;
						</div>
					</c:if>
					<span name="rlNm" id="rlNm">&nbsp;</span>
				</div>
			</div>
			<div id="mp1DIV" class="fieldBox col_33">
					<div class="label">电话</div>
					<div class="field">
						<c:if test="${isDetail==0 }">
							<a href="javascript:toRePrjPage('reMp1','mp1')" class="sq-button-hasicon link">
							<i class="sqBtnIco_1"></i>
							</a>
							&nbsp;&nbsp;
						</c:if>
						<span name="mp1" id="mp1">&nbsp;</span>
					</div>
				</div>
			<div class="fieldBox col_33" id="certNoDIV">
					<div class="label">身份证号码</div>
					<div class="field">
						<c:if test="${isDetail==0 }">
							<a href="javascript:toRePrjPage('reCertNo','certNo')" class="sq-button-hasicon link">
							<i class="sqBtnIco_1"></i>
							</a>
							&nbsp;&nbsp;
						</c:if>
						<span name="certNo" id="certNo">&nbsp;</span>
					</div>
				</div>
				<div id="mp_mateDIV" class="fieldBox col_33">
					<div class="label">配偶电话</div>
					<div class="field">
						<c:if test="${isDetail==0 }">
						<div id="re_mp_mateDIV">
							<a href="javascript:toRePrjPage('reMp1','mp_mate')" class="sq-button-hasicon link">
							<i class="sqBtnIco_1"></i>
							</a>
							&nbsp;&nbsp;
						</div>
						</c:if>
						<span name="mp_mate" id="mp_mate">&nbsp;</span>
					</div>
				</div>
				<div id="idAddrDIV" class="fieldBox col_66">
					<div class="label">身份证地址</div>
					<div class="field">
						<c:if test="${isDetail==0 }">
							<a href="javascript:toRePrjPage('reIdAddr','idAddr')" class="sq-button-hasicon link">
							<i class="sqBtnIco_1"></i>
							</a>
							&nbsp;&nbsp;
						</c:if>
						<span name="idAddr" id="idAddr">&nbsp;</span>
					</div>
				</div>
				<div id="postAddrDIV" class="fieldBox col_66">
					<div class="label">通讯地址</div>
					<div class="field">
						<c:if test="${isDetail==0 }">
							<a href="javascript:toRePrjPage('rePostAddr','postAddr')" class="sq-button-hasicon link">
							<i class="sqBtnIco_1"></i>
							</a>
							&nbsp;&nbsp;
						</c:if>
						<span name="postAddr" id="postAddr">&nbsp;</span>
					</div>
				</div>
				<div id="workPlcDIV" class="fieldBox col_33">
					<div class="label">工作单位</div>
					<div class="field">
						<c:if test="${isDetail==0 }">
							<a href="javascript:toRePrjPage('reWorkPlc','workPlc')" class="sq-button-hasicon link">
							<i class="sqBtnIco_1"></i>
							</a>
							&nbsp;&nbsp;
						</c:if>
						<span name="workPlc" id="workPlc">&nbsp;</span>
					</div>
				</div>
				<div id="workAddrDIV" class="fieldBox col_66">
					<div class="label">单位地址</div>
					<div class="field">
						<c:if test="${isDetail==0 }">
							<a href="javascript:toRePrjPage('reWorkAddr','workAddr')" class="sq-button-hasicon link">
							<i class="sqBtnIco_1"></i>
							</a>
							&nbsp;&nbsp;
						</c:if>
						<span name="workAddr" id="workAddr">&nbsp;</span>
					</div>
				</div>
			<div class="caption">
				<span class="title">担保人信息</span>
			</div>
			<div id="guarantor" class="fieldBox col_100">
		        <div class="sqPanel">
		            <div class="sqPanel_body">
		                <div id="ligergrid_guarantor" class="sq-grid"></div>
		            </div>
		        </div>
		    </div>
		    <c:if test="${showLinkPerson == 1 || isDetail==0}">
				<div class="caption">
					<span class="title">第三方联系人信息</span>
				</div>
				<div id="linkPerson" class="fieldBox col_100">
			        <div class="sqPanel">
			            <div class="sqPanel_body">
			                <div id="ligergrid_linkPerson" class="sq-grid"></div>
			            </div>
			        </div>
			    </div>
		    </c:if>
			<div class="caption">
				<span class="title">项目信息及产品政策</span>
			</div>
			<!-- <div class="fieldBox col_33">
				<div class="label">项目名称</div>
				<div class="field">
					<a href="javascript:toPrjDetail()" class="link">
						<span name="prjNm" id="prjNm">&nbsp;</span>
					</a>
				</div>
			</div> -->
			<div class="fieldBox col_33">
				<div class="label">合同编号</div>
				<div class="field">
					<a href="javascript:toPrjDetail()" class="link">
						<span name="lsCntNo" id="lsCntNo">&nbsp;</span>
					</a>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">代理商类型</div>
				<div class="field">
					<span name="agntTypCdNm" id="agntTypCdNm">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">业务类型</div>
				<div class="field">
					<span name="bizTypCdNm" id="bizTypCdNm">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">项目类型</div>
				<div class="field">
					<span name="prjTypCdNm" id="prjTypCdNm">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">业务来源</div>
				<div class="field">
					<span name="bizResCdNm" id="bizResCdNm">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">合同总金额</div>
				<div class="field">
					<span name="contAmt" id="contAmt">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">融资总金额</div>
				<div class="field">
					<span name="actLsAmt" id="actLsAmt">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">融资期限</div>
				<div class="field">
					<span name="lsPd" id="lsPd">&nbsp;</span>
					<span name="lsPdUntCdNm" id="lsPdUntCdNm">&nbsp;</span>
				</div>
			</div>
			<!-- <div class="fieldBox col_33">
				<div class="label">租赁周期</div>
				<div class="field">
				</div>
			</div> -->
			<div class="fieldBox col_33">
				<div class="label">租赁年利率</div>
				<div class="field">
					<span name="annIntRatePct" id="annIntRatePct">&nbsp;</span>%
				</div>
			</div>
			<div class="fieldBox col_33" style="display: none">
				<div class="label">利率上浮比例</div>
				<div class="field">
					<span name="intRateRsPct" id="intRateRsPct">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">首付比例</div>
				<div class="field">
					<span name="firstFeePct" id="firstFeePct">&nbsp;</span>%
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">保证金比例</div>
				<div class="field">
					<span name="assureFeePct" id="assureFeePct">&nbsp;</span>%
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">收益率</div>
				<div class="field">
					<span name="irrPct" id="irrPct">&nbsp;</span>%
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">咨询费1</div>
				<div class="field">
					<span name="consultFeeAmt" id="consultFeeAmt">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">咨询费2</div>
				<div class="field">
					<span name="consultFeeAmt1" id="consultFeeAmt1">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">留购价</div>
				<div class="field">
					<span name="purchaseFeeAmt" id="purchaseFeeAmt">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">保险保证金</div>
				<div class="field">
					<span name="insAssureFeeAmt" id="insAssureFeeAmt">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">供应商返利金额</div>
				<div class="field">
					<span name="rebateAmt" id="rebateAmt">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">供应商返利比例</div>
				<div class="field">
					<span name="rebatePct" id="rebatePct">&nbsp;</span>%
				</div>
			</div>
			<div class="fieldBox col_33" <c:if test="${buOrgCd!=00000008 }">style="display: none"</c:if>>
				<div class="label">额外上牌抵押费</div>
				<div class="field">
					<span name="extraMortgageAmt" id="extraMortgageAmt">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33" style="display: none">
				<div class="label">融资数量</div>
				<div class="field">
					<span name="" id="">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33" style="display: none">
				<div class="label">是否挂靠</div>
				<div class="field">
					<span name="" id="">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33" style="display: none">
				<div class="label">挂靠公司名称</div>
				<div class="field">
					<span name="" id="">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33" style="display: none">
				<div class="label">挂靠公司归属</div>
				<div class="field">
					<span name="" id="">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33" style="display: none">
				<div class="label">客户保证金</div>
				<div class="field">
					<span name="assureFeeAmt" id="assureFeeAmt">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33" style="display: none">
				<div class="label">首期租金</div>
				<div class="field">
					<span name="firstFeeAmt" id="firstFeeAmt">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33" style="display: none">
				<div class="label">租赁期满处理方式</div>
				<div class="field">
					<span name="expHdlWayCdNm" id="expHdlWayCdNm">&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_33" style="display: none">
				<div class="label">支付方式</div>
				<div class="field">
					<span name="payWayCdNm" id="payWayCdNm">&nbsp;</span>
				</div>
			</div>
			<div class="caption">
		        <span class="title">项目产品信息</span>
		            	<!-- <div class="btnsBox inLC">
	                        <span id="addBtn" class="sq-button sq-button-round" onclick="toGuaKaoDetail();">
	                        	查看产品挂靠
	                        </span>
	                    </div> -->
		    </div>
		    <div id="truck0" class="fieldBox col_100" style="display: none">
		        <div class="sqPanel">
		            <div class="sqPanel_head inL">
		                <span>卡车</span>
		            </div>
		            <div class="sqPanel_body">
		                <div id="ligergrid_fee_truck" class="sq-grid"></div>
		            </div>
		        </div>
		    </div>
		    <div id="tk_bus0" class="fieldBox col_100" style="display: none">
		        <div class="sqPanel">
		            <div class="sqPanel_head inL">
		                <span>客车</span>
		            </div>
		            <div class="sqPanel_body">
		                <div id="ligergrid_fee_tk_bus" class="sq-grid"></div>
		            </div>
		        </div>
		    </div>
		    <div id="car0" class="fieldBox col_100" style="display: none">
		        <div class="sqPanel">
		            <div class="sqPanel_head inL">
		                <span>乘用车</span>
		            </div>
		            <div class="sqPanel_body">
		                <div id="ligergrid_fee_car" class="sq-grid"></div>
		            </div>
		        </div>
		    </div>
		    <div id="bus0" class="fieldBox col_100" style="display: none">
		        <div class="sqPanel">
		            <div class="sqPanel_head inL">
		                <span>专车</span>
		            </div>
		            <div class="sqPanel_body">
		                <div id="ligergrid_fee_bus" class="sq-grid"></div>
		            </div>
		        </div>
		    </div>
		    
		    <div id="xnyBus0" class="fieldBox col_100" style="display: none">
		        <div class="sqPanel">
		            <div class="sqPanel_head inL">
		                <span>新能源客车</span>
		            </div>
		            <div class="sqPanel_body">
		                <div id="ligergrid_fee_xny_bus" class="sq-grid"></div>
		            </div>
		        </div>
		    </div>
		    <div id="xnyTk0" class="fieldBox col_100" style="display: none">
		        <div class="sqPanel">
		            <div class="sqPanel_head inL">
		                <span>新能源卡车</span>
		            </div>
		            <div class="sqPanel_body">
		                <div id="ligergrid_fee_xny_tk" class="sq-grid"></div>
		            </div>
		        </div>
		    </div>
		    <div id="sz0" class="fieldBox col_100" style="display: none">
		        <div class="sqPanel">
		            <div class="sqPanel_head inL">
		                <span>上装产品</span>
		            </div>
		            <div class="sqPanel_body">
		                <div id="ligergrid_fee_sz" class="sq-grid"></div>
		            </div>
		        </div>
		    </div>
		    
		    <div id="farm0" class="fieldBox col_100" style="display: none">
		        <div class="sqPanel">
		            <div class="sqPanel_head inL">
		                <span>农机</span>
		            </div>
		            <div class="sqPanel_body">
		                <div id="ligergrid_fee_farm" class="sq-grid"></div>
		            </div>
		        </div>
		    </div>
		    <div class="caption">
				<span class="title">车辆运营</span>
			</div>
			<div class="fieldBox col_50">
				<div class="label" role="textclip">自有车辆情况</div>
				<div class="field">
					<textarea name="selfTkDesc" id="selfTkDesc" class="ui-textarea l-textarea" style="width:98%" rows ="1" value="" ></textarea>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label" role="textclip">运营路线</div>
				<div class="field">
					<textarea name="route" id="route" class="ui-textarea l-textarea" style="width:98%" rows ="1" value="" ></textarea>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">收入方式</div>
				<div class="field">
					<select name="profitCd" id="profitCd" data-value=" ">
						<option value=" " checked >请选择</option>
						<c:forEach items="${profitCdList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">运营年限</div>
				<div class="field">
					<select name="experience" id="experience" data-value=" ">
						<option value=" " checked >请选择</option>
						<c:forEach items="${bizExpList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="fieldBox col_33" <c:if test="${buOrgCd==00000008 }">style="display: none"</c:if>>
				<div class="label">主货物大类</div>
				<div class="field">
					<select name="mainGoodsCd" id="mainGoodsCd" data-value=" " onchange="getGoods();">
						<option value=" " checked >请选择</option>
						<c:forEach items="${mainGdsTypCdList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="fieldBox col_33" <c:if test="${buOrgCd==00000008 }">style="display: none"</c:if>>
				<div class="label">主运输货物</div>
				<div class="field">
					<select name="goods" id="goods" data-value=" " onchange="checkGoods();">
					</select>
				</div>
			</div>
			<div id='goodsDispDIV' class="fieldBox col_33" style="display: none">
				<div class="label">主运输货物描述</div>
				<div class="field">
					<input name="goodsDisp" id="goodsDisp" type="text" class="ui-textbox" value="" >
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">货物来源</div>
				<div class="field">
					<select name="goodsResCd" id="goodsResCd" data-value=" ">
						<option value=" " checked >请选择</option>
						<c:forEach items="${goodsResList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">主货物结算方式</div>
				<div class="field">
					<select name="settlementTypeCd" id="settlementTypeCd" data-value=" ">
						<option value=" " checked >请选择</option>
						<c:forEach items="${gdsStlWayCdList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">司机情况</div>
				<div class="field">
					<select name="driverInfo" id="driverInfo" data-value=" ">
						<option value=" " checked >请选择</option>
						<c:forEach items="${driverList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">第二还款来源</div>
				<div class="field">
					<select name="secondPayResCd" id="secondPayResCd" data-value=" ">
						<option value=" " checked >请选择</option>
						<c:forEach items="${secondPayResCdList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<!-- 专车客车 Start -->
				<div class="fieldBox col_33" <c:if test="${buOrgCd!=00000008 }">style="display: none"</c:if>>
					<div class="label">净收入</div>
					<div class="field">
						<input name="netIncome" id="netIncome" type="text" data-tofix="2" class="ui-textbox" value="" validate ="{number:true}">
						元/月
					</div>
				</div>
				<div class="fieldBox col_33" <c:if test="${buOrgCd!=00000008 }">style="display: none"</c:if>>
					<div class="label">旺季包车费</div>
					<div class="field">
						<input name="highEasonCharterdBus" id="highEasonCharterdBus" type="text" data-tofix="2" class="ui-textbox" value="" validate ="{number:true}">
						元/天
					</div>
				</div>
				<div class="fieldBox col_33" <c:if test="${buOrgCd!=00000008 }">style="display: none"</c:if>>
					<div class="label">淡季包车费</div>
					<div class="field">
						<input name="peakEasonCharterdBus" id="peakEasonCharterdBus" type="text" data-tofix="2" class="ui-textbox" value="" validate ="{number:true}">
						元/天
					</div>
				</div>
				<div class="fieldBox col_33" <c:if test="${buOrgCd!=00000008 }">style="display: none"</c:if>>
					<div class="label">其他费用占比</div>
					<div class="field">
						<input name="otherFeePct" id="otherFeePct" type="text" class="ui-textbox" value="" validate ="{number:true}">
						%
					</div>
				</div>
				<div class="fieldBox col_33" <c:if test="${buOrgCd!=00000008 }">style="display: none"</c:if>>
					<div class="label">毛收入</div>
					<div class="field">
						<input name="grossIncome" id="grossIncome" type="text" data-tofix="2" class="ui-textbox" value="" validate ="{number:true}">
						元/月						
					</div>
				</div>
				<!-- 专车客车 end -->
			<div class="fieldBox col_66">
				<div class="label" role="textclip">其他信息</div>
				<div class="field">
					<!-- <textarea name="otherInfo" id="otherInfo" class="l-textarea" style="width:99%" rows ="1" value="" ></textarea> -->
					<textarea name="otherInfo" id="otherInfo" rows="1" class="ui-textarea l-textarea" style="width:96%;height: 20px;"></textarea>
				</div>
			</div>
			<!-- <div class="fieldBox col_33">
				<div class="label">司机情况</div>
				<div class="field">
					<input name="driverInfo" id="driverInfo" type="text" class="ui-textbox" value="" >
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">出发地</div>
				<div class="field">
					<input name="startplace" id="startplace" type="text" class="ui-textbox" value="" >
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">目的地</div>
				<div class="field">
					<input name="destination" id="destination" type="text" class="ui-textbox" value="" >
				</div>
			</div>
			<div id="dyncPrdOperateDiv" class="fieldBox col_100_auto">
			</div> -->
			<div id="auditorEvaluationDiv" hidden>
			<div class="caption">
				<span class="title">信审员评价</span>
			</div>
			<div class="fieldBox col_33">
				<div class="label">是否首次立项</div>
				<div class="field">
					<select name="isNew" id="isNew" data-value=" " validate ="{required:true,select:true}">
						<option value=" " checked >请选择</option>
						<c:forEach items="${yesOrNoCdList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
					<span class="requiredSymbol">*</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">流程审核意见</div>
				<div class="field">
					<select name="processOpinionCd" id="processOpinionCd" data-value=" " validate ="{required:true,select:true}">
						<option value=" " checked >请选择</option>
						<c:forEach items="${processOpinionCdList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
					<span class="requiredSymbol">*</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">客户经理评级</div>
				<div class="field">
					<select name="cstMgrLvlCd" id="cstMgrLvlCd" data-value=" ">
						<option value=" " checked >请选择</option>
						<c:forEach items="${cstMgrLvlCdList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
					<span id="cstMgrLvlCdSpan" style="display:none" class="requiredSymbol">*</span>
				</div>
			</div>
			<div class="fieldBox col_33" <c:if test="${buOrgCd == 00000013 }">style="display:none"</c:if>>
				<div class="label">本地生活年限</div>
				<div class="field">
					<select name="localLiveTmCd" id="localLiveTmCd" data-value=" ">
						<option value=" " checked >请选择</option>
						<c:forEach items="${bizExpList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
					<span id="localLiveTmCdSpan" style="display:none" class="requiredSymbol">*</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">风控评级</div>
				<div class="field">
					<select name="riskCtrlLvlCd" id="riskCtrlLvlCd" data-value=" ">
						<option value=" " checked >请选择</option>
						<c:forEach items="${riskCtrlLvlCdList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
					<span id="riskCtrlLvlCdSpan" style="display:none" class="requiredSymbol">*</span>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label">首付款来源</div>
				<div class="field">
					<select name="firstPayResCd" id="firstPayResCd" data-value=" ">
						<option value=" " checked >请选择</option>
						<c:forEach items="${firstPayResCdList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
					<span id="firstPayResCdSpan" style="display:none" class="requiredSymbol">*</span>
				</div>
			</div>
			<div class="fieldBox col_100" <c:if test="${showIsMeetPolicyCd!=1 }">style="display:none"</c:if> >
				<div class="label">是否符合政策</div>
				<div class="field">
					<select name="isMeetPolicyCd" id="isMeetPolicyCd" data-value=" ">
						<option value=" " checked >请选择</option>
						<c:forEach items="${isMeetPolicyCdList }" var="kv">
							<option value="${kv.key }">${kv.value }</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label" role="textclip">资质评价</div>
				<div class="field">
					<textarea name="qualificationOpn" id="qualificationOpn" rows="1" class="ui-textarea l-textarea" style="width:90%"></textarea>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label" role="textclip">资料评价</div>
				<div class="field">
					<textarea name="infomationOpn" id="infomationOpn" rows="1" class="ui-textarea l-textarea" style="width:90%"></textarea>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label" role="textclip">方案评价</div>
				<div class="field">
					<textarea name="schemeOpn" id="schemeOpn" rows="1" class="ui-textarea l-textarea" style="width:90%"></textarea>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label" role="textclip">风险评价</div>
				<div class="field">
					<textarea name="riskOpn" id="riskOpn" class="ui-textarea l-textarea" style="width:90%" rows ="1" ></textarea>
				</div>
			</div>
			<div class="fieldBox col_33">
				<div class="label" role="textclip">线下合同资料</div>
				<div class="field">
					<textarea name="offLionContract" id="offLionContract" class="ui-textarea l-textarea" style="width:90%" rows ="1" ></textarea>
				</div>
			</div>
			<div class="fieldBox col_33" <c:if test="${buOrgCd != 00000013 }">style="display:none"</c:if>>
				<div class="label" role="textclip">个人征信</div>
				<div class="field">
					<textarea name="ownCreditInfo" id="ownCreditInfo" class="ui-textarea l-textarea" style="width:90%" rows ="1" ></textarea>
				</div>
			</div>
			<div class="fieldBox col_50" <c:if test="${isBusKC!=1 }">style="display: none"</c:if>>
				<div class="label" role="textclip">人行征信</div>
				<div class="field">
					<textarea name="pbcCreditInfo" id="pbcCreditInfo" class="ui-textarea l-textarea" style="width:98%" rows ="1" value="" ></textarea>
				</div>
			</div>
			<div class="fieldBox col_50" <c:if test="${isBusKC!=1 }">style="display: none"</c:if>>
				<div class="label" role="textclip">三方征信</div>
				<div class="field">
					<textarea name="tripCreditInfo" id="tripCreditInfo" class="ui-textarea l-textarea" style="width:98%" rows ="1" value="" ></textarea>
				</div>
			</div>
			<div class="fieldBox col_100">
				<div class="label">通过意见链接</div>
				<div class="field">
				<c:if test="${busFlowInfoPage!=1 }">
					<a href="<%=path%>/project/audit/toAdditionalInfoPage.do?isDetail=1&projectId=${projectId}&processInstanceId=${proIntId}" target="_blank" class="link">
						/project/audit/toAdditionalInfoPage.do?isDetail=1&projectId=${projectId}&processInstanceId=${proIntId}
					</a>
				</c:if>
				<c:if test="${busFlowInfoPage==1 }">
					<a href="<%=path%>/project/audit/toBusAdditionalInfoPage.do?isBusKC=${isBusKC}&isDetail=1&projectId=${projectId}&processInstanceId=${proIntId}" target="_blank" class="link">
						/project/audit/toBusAdditionalInfoPage.do?isBusKC=${isBusKC}&isDetail=1&projectId=${projectId}&processInstanceId=${proIntId}
					</a>
				</c:if>
				</div>
			</div>
			</div>
			<%-- <c:if test="${showCredit==1 }">
				<div class="fieldBox col_100">
					<c:if test="${flag==0 }">
						<div class="label">征信查询</div>
					</c:if>
					<c:if test="${flag==1 }">
						<div class="label">征信附议</div>
					</c:if>
					<div class="field">
						<a href="javascript:showCredit()" class="link">
							点击查看
						</a>
					</div>
				</div>
			</c:if> --%>
			<%-- <c:if test="${isDetail==0 && (buOrgCd==00000001 || buOrgCd==00000009)}">
				<div class="fieldBox col_100">
					<div class="label">征信前置</div>
					<div class="field">
						<a href="javascript:showCreditPrepositionByCertNo()" class="link">
							点击查看
						</a>
					</div>
				</div>
			</c:if> --%>
			<%-- <c:if test="${isDetail==0 && prjTypCd!='CPYW' && prjTypCd!='DSFZGCP' && prjTypCd!='DSFZGCT'}">
				<div class="fieldBox col_33">
					<div class="label">人行征信及三方</div>
					<div class="field">
						<a href="javascript:toTripartitePage()" class="link">
							<span >获取</span>
						</a>
					</div>
				</div>
			</c:if> --%>
			<%-- <c:if test="${isDetail==0 }">
				<c:if test="${prjTypCd=='DSFZGCP' || prjTypCd=='DSFZGCT' }">
					<c:if test="${sendStatus=='success' }">
						<div class="fieldBox col_33">
							<div class="label">征信查询结果</div>
							<div class="field">
							    <span>
							    	<c:if test="${auditResult=='pending' }">待处理</c:if>
									<c:if test="${auditResult=='pass' }">通过</c:if>
									<c:if test="${auditResult=='reject' }">拒绝/驳回</c:if>
									<c:if test="${auditResult=='quit' }">放弃/退出</c:if>
									<c:if test="${auditResult=='unknown' }">其他/未知</c:if>
							    </span>
							</div>
						</div>
					</c:if>
	                <c:if test="${sendStatus!='success' }">
	                	<div class="fieldBox col_33">
							<div class="label">提交征信结果</div>
							<div class="field">
								<span>${sendStatusNm }</span>
								<a href="javascript:submitCredit()" class="link">
			                    	<span>提交征信</span>
								</a>
							</div>
						</div>
	                </c:if>
				</c:if>
			</c:if> --%>
		</div>
		<div class="btnsBox">
			<c:if test="${isDetail==0 }">
				<sys:funcAuth resCd="addCreditInfo">
					<span id="saveBtn1" class="sq-button sq-button-round" onclick="addCreditInfo();">保存至信审基础台账</span>
				</sys:funcAuth>
				<!-- <span id="subAudBscBook" class="sq-button sq-button-round" onclick="subAudBscBook();">提交至信审基础台账</span> -->
		        <!-- <span id="bbb" class="sq-button sq-button-round" onclick="toCreditPassOpinionAdd();">信审通过意见</span> -->
				<sys:funcAuth resCd="addAudRejectOpinion">
		        	<span id="ccc" class="sq-button sq-button-round" onclick="toCreditRejectOpinionAdd();">信审驳回意见</span>
				</sys:funcAuth>
		        <!-- <span id="audInterviewBtn" class="sq-button sq-button-round" onclick="toAudInterviewAdd();">面谈信息</span> -->
		        <!-- <span id="aaa" class="sq-button sq-button-round" onclick="toAudReturnVisitAdd();">修改回访</span>
		        <span id="aaa" class="sq-button sq-button-round" onclick="toAudReturnVisitDetail();">查看回访</span> -->
			</c:if>
			<c:if test="${isDetail==1 }">
				<!-- <span id="subAudBscBook" class="sq-button sq-button-round" onclick="subAudBscBook();">查看信审基础台账</span> -->
		        <!-- <span id="aaa" class="sq-button sq-button-round" onclick="toAudReturnVisitDetail();">查看回访</span> -->
			</c:if>
			<span id="prjFileInfo" class="sq-button sq-button-round" onclick="toPrjFileInfo();">项目资料信息</span>
			<c:if test="${confirmPay==1 || confirmPay==2 }">
				<sys:funcAuth resCd="auditPayInfo">
					<span id="payInfo" class="sq-button sq-button-round" onclick="toPayInfoList();">付款审核</span>
				</sys:funcAuth>
			</c:if>
	        <input name="creditInfoId" id="creditInfoId" type="hidden" value="">
	    </div>
	</form>
</div>
<script type="text/javascript">
var _projectId = '${projectId}';//项目ID
var _proIntId = '${proIntId}';//流程实例ID
var _taskId = '${taskId}';//任务节点ID
var _taskDefKey = '${taskDefKey}';//任务节点KEY
var _taskNm = '${taskNm}';//节点名称
var _prdTypCd = '${prdTypCd}';//产品类型
var isDetail = '${isDetail}';
var ctrlKey = '${ctrlKey}';
// 信审初审节点flag
var fromCAFlag = '${fromCAFlag}';

var mainData;//信审整体资料信息

var truckGrid;
var tkBusGrid;
var carGrid;
var busGrid;
var farmGrid;
var xnyTkGrid;
var xnyBusGrid;
var szGrid;

var cstMgrOrgCd;
var buOrgCd;

$(function () {
	$('#formSet1').ligerForm({
        validate : true
	});
	var saveCstLvl = '${saveCstLvl}';
	if(saveCstLvl!=1 && liger.get("cstLvlCd")){
		liger.get("cstLvlCd").setDisabled(true);
	}
	
	initPrjInfo();//初始化项目相关详情信息
	initGuarantorList();//初始化担保人列表
	initLinkPersonGrid();//初始化第三方联系人列表
	//refleshDyncPrdOperateDiv();//刷新车辆运营模块动态字段
	initCreditData();//初始化信审整体资料信息
	if(isDetail==1){
		disableFixedFiled();//禁用固定标签
	}
	//判断条件初始化产品列表
	var tCodeString  ='${tCodeString}';
	if(!StringUtils.isEmpty(tCodeString)){
		var tCodeArr = tCodeString.split(";");
		if(tCodeArr.indexOf(AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_TK)>-1){
			initTruckList();//初始化卡车产品列表
		}
		if(tCodeArr.indexOf(AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_TK_BUS)>-1){
			initTkBusList();//初始化卡车客车产品列表
		}
		if(tCodeArr.indexOf(AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_CAR)>-1){
			initCarList();//初始化乘用车车产品列表
		}
		if(tCodeArr.indexOf(AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_BUS)>-1){
			initBusList();//初始化专车产品列表
		}
		if(tCodeArr.indexOf(AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_FARM)>-1){
			initFarmList();//初始化农机产品列表
		}
		if(tCodeArr.indexOf(AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_XNY_BUS)>-1){
			initXnyBusList();//新能源客车
		}
		if(tCodeArr.indexOf(AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_XNY_TK)>-1){
			initXnyTkList();//新能源卡车
		}
		if(tCodeArr.indexOf("010")>-1){
			initSzList();//上装产品
		}
	}
	/* for(var i=0; i<tCodeArr.length; i++){  
		alert(tCodeArr[i]);
	} */
	valitadeRgnProvCd("formSet1");
	SET_popupIframeHeight();
	$("#rlNmReDiv").hide();
	//信审员评价模块是否展示控制
	ctrlAuditorEvaluationShow();
});

function ctrlAuditorEvaluationShow() {
	<sys:funcAuth resCd="auditorEvaluation">
	$("#auditorEvaluationDiv").show();
	</sys:funcAuth>
}

function toAuditOpn(){
	//window.location.href='/project/audit/toAdditionalInfoPage.do?isDetail=1&projectId=${projectId}&processInstanceId=${proIntId}';
	window.open('<%=path%>/project/audit/toAdditionalInfoPage.do?isDetail=1&projectId=${projectId}&processInstanceId=${proIntId}');
}

//请求项目相关展示数据(参数:项目ID)
function initPrjInfo(){
	if(!_projectId){
		return;
	}
   	var _url = '<%=path%>/project/audit/getProjectInfoByPrjId.do';
	$.ajax({
   		type: 'get',
   		dataType:'json',
   		data:{
   			projectId:_projectId
   		},
   		url: _url,
   		success:function(msg){
			if(msg.success == 1){
				setPrjInfoData(msg.data);//设置数据
			}else{
				top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
			}
		}
	});
}

var _certNo;
function setPrjInfoData(data){
	/**项目基本信息*/
	var prjBscinfoVO = data.prjBscinfoVO;
	if(prjBscinfoVO){
		//$("#prjNm").html(prjBscinfoVO.prjNm);
		$("#prjTypCdNm").html(prjBscinfoVO.prjTypCdNm);
		$("#bizTypCdNm").html(prjBscinfoVO.bizTypCdNm);
		$("#agntTypCdNm").html(prjBscinfoVO.agntTypCdNm);
		$("#lsCntNo").html(prjBscinfoVO.lsCntNo);
		$("#bizResCdNm").html(prjBscinfoVO.bizResCdNm);
		$("#cstMgrNm").html(prjBscinfoVO.cstMgrNm);
		$("#cstMgrOrgCdNm").html(prjBscinfoVO.cstMgrOrgCdNm);
		$("#cstNm").html(prjBscinfoVO.cstNm);
		$("#cstMgrId").val(prjBscinfoVO.cstMgrId);
		cstMgrOrgCd = prjBscinfoVO.cstMgrOrgCd;
		buOrgCd = prjBscinfoVO.buOrgCd;
		//TODO 判断城配业务 设置必填项校验 
		var prjTypCd = prjBscinfoVO.prjTypCd;
		if(ProjectConstant.CODE_PRJ_TYP_CD_CPYW==prjTypCd){
			var formSet1=liger.get("formSet1");
			formSet1.setFieldValidate("cstMgrLvlCd", {
		        required: true,
		        select: true
		    });
			formSet1.setFieldValidate("localLiveTmCd", {
		        required: true,
		        select: true
		    });
			formSet1.setFieldValidate("riskCtrlLvlCd", {
		        required: true,
		        select: true
		    });
			formSet1.setFieldValidate("firstPayResCd", {
		        required: true,
		        select: true
		    });
			$("#cstMgrLvlCdSpan").show();
			$("#localLiveTmCdSpan").show();
			$("#riskCtrlLvlCdSpan").show();
			$("#firstPayResCdSpan").show();
		}
	}
	/**自然人承租人信息*/
	var cstBscInfoVO = data.cstBscInfoVO;
	_certNo = cstBscInfoVO.certNo;
	
	if(cstBscInfoVO && cstBscInfoVO.cstTypCd!=CustomerConstant.CST_TYPE_NP_CD){//不是自然人,没有婚姻状况和配偶信息
		$("#marStsCdNmDIV").hide();
		$("#rlNmDIV").hide();
		$("#mp1DIV").hide();
		$("#certNoDIV").hide();
		$("#mp_mateDIV").hide();
		$("#idAddrDIV").hide();
		$("#postAddrDIV").hide();
		$("#workPlcDIV").hide();
		$("#workAddrDIV").hide();
	}
	if(cstBscInfoVO){
		$("#cstId").val(cstBscInfoVO.id);
		$("#cstTypCd").val(cstBscInfoVO.cstTypCd);
		if(isDetail==0 && StringUtils.isNotEmpty(cstBscInfoVO.cstTypCd)){
			if(CustomerConstant.CST_TYPE_CORP_CD == cstBscInfoVO.cstTypCd){
				$("#recsttyp2").show();
			}
			if(CustomerConstant.CST_TYPE_NP_CD == cstBscInfoVO.cstTypCd){
				$("#recsttyp1").show();
			}
		}
		var cstNpBscInfoVO = cstBscInfoVO.cstNpBscInfoVO;
		if(cstNpBscInfoVO){
			$("#marStsCdNm").html(cstNpBscInfoVO.marStsCdNm);
			var cstNpSocialRlVO = cstNpBscInfoVO.cstNpSocialRlVO;
			if(cstNpSocialRlVO){
				if(StringUtils.isNotEmpty(cstNpSocialRlVO.rlNm)){
					$("#rlNmReDiv").show();
				}
				$("#rlNm").html(cstNpSocialRlVO.rlNm);
			}
			if(StringUtils.isNotEmpty(cstNpBscInfoVO.mp1)){
				$("#mp1").html(cstNpBscInfoVO.mp1);
			}else if(StringUtils.isNotEmpty(cstNpBscInfoVO.mp2)){
				$("#mp1").html(cstNpBscInfoVO.mp2);
			}
			$("#certNo").html(cstBscInfoVO.certNo);
			$("#idAddr").html(cstNpBscInfoVO.idAddr);
			if(isDetail==0 && StringUtils.isEmpty(cstNpBscInfoVO.idAddr)){
				$("#idAddr").siblings().remove();
			}
			$("#postAddr").html(cstNpBscInfoVO.postAddr);
			if(isDetail==0 && StringUtils.isEmpty(cstNpBscInfoVO.postAddr)){
				$("#postAddr").siblings().remove();
			}
			$("#workPlc").html(cstNpBscInfoVO.workPlc);
			if(isDetail==0 && StringUtils.isEmpty(cstNpBscInfoVO.workPlc)){
				$("#workPlc").siblings().remove();
			}
			$("#workAddr").html(cstNpBscInfoVO.workAddr);
			if(isDetail==0 && StringUtils.isEmpty(cstNpBscInfoVO.workAddr)){
				$("#workAddr").siblings().remove();
			}
			if(cstNpSocialRlVO){
				$("#mp_mate").html(cstNpSocialRlVO.mp);
				if(isDetail==0 && StringUtils.isEmpty(cstNpSocialRlVO.mp)){
					$("#mp_mate").siblings().remove();
				}
				if(StringUtils.isEmpty(cstNpSocialRlVO.mp)){
					$("#re_mp_mateDIV").hide();
				}
			}else{
				$("#rlNm").siblings().remove();
				$("#mp_mate").siblings().remove();
				$("#re_mp_mateDIV").hide();
			}
		}
		
	}
	/**担保人信息*/
	var prjCstBscInfoVO = data.prjCstBscInfoVO;
	if(prjCstBscInfoVO){
		$("#cstNm_1").html(prjCstBscInfoVO.cstNm);
	}
	/**报价方案信息*/
	var prjQuatPrpsVO = data.prjQuatPrpsVO;
	if(prjQuatPrpsVO){
		//$("#contAmt").html(prjQuatPrpsVO.contAmt);
		if(prjQuatPrpsVO.contAmt){
			$("#contAmt").text(FormatMoney(parseFloat(prjQuatPrpsVO.contAmt)));//合同总金额
		}
		$("#annIntRatePct").html(prjQuatPrpsVO.annIntRatePct);
		$("#intRateRsPct").html(prjQuatPrpsVO.intRateRsPct);
		//$("#actLsAmt").html(prjQuatPrpsVO.actLsAmt);
		if(prjQuatPrpsVO.actLsAmt){
			$("#actLsAmt").text(FormatMoney(parseFloat(prjQuatPrpsVO.actLsAmt)));//融资总金额
		}
		$("#lsPd").html(prjQuatPrpsVO.lsPd);
		$("#lsPdUntCdNm").html(prjQuatPrpsVO.lsPdUntCdNm);
		$("#expHdlWayCdNm").html(prjQuatPrpsVO.expHdlWayCdNm);
		$("#payWayCdNm").html(prjQuatPrpsVO.payWayCdNm);
		$("#irrPct").html(prjQuatPrpsVO.irrPct);
	}
	/**费用相关*/
	if(data.firstFeeAmt){
		$("#firstFeeAmt").text(FormatMoney(parseFloat(data.firstFeeAmt)));//首期租金
	}
	$("#firstFeePct").html(data.firstFeePct);//首期比例
	if(data.assureFeeAmt){
		$("#assureFeeAmt").text(FormatMoney(parseFloat(data.assureFeeAmt)));//保证金
	}
	$("#assureFeePct").html(data.assureFeePct);//保证金比例
	if(data.consultFeeAmt1!=null){
		$("#consultFeeAmt1").text(FormatMoney(parseFloat(data.consultFeeAmt1)));//咨询费2
	}
	if(data.consultFeeAmt!=null){
		$("#consultFeeAmt").text(FormatMoney(parseFloat(data.consultFeeAmt)));//咨询费1
	}
	if(data.purchaseFeeAmt!=null){
		$("#purchaseFeeAmt").text(FormatMoney(parseFloat(data.purchaseFeeAmt)));//留购价
	}
	if(data.insAssureFeeAmt!=null){
		$("#insAssureFeeAmt").text(FormatMoney(parseFloat(data.insAssureFeeAmt)));//保险保证金
	}
	if(data.rebateAmt!=null){
		$("#rebateAmt").text(FormatMoney(parseFloat(data.rebateAmt)));//供应商返利金额
	}
	$("#rebatePct").html(data.rebatePct);//供应商返利比例
	if(data.extraMortgageAmt!=null){
		$("#extraMortgageAmt").text(FormatMoney(parseFloat(data.extraMortgageAmt)));//额外上牌抵押费
	}
	
}
//初始化担保人列表
function initGuarantorList(){
	if(!_projectId)return;
	guarantorGrid = $("#ligergrid_guarantor").ligerGrid({
        url: '<%=path%>/project/audit/initGuarantorList.do',
        method: 'get',
        parms:{
        	prjId:_projectId,
        	cstRlTyp:ProjectConstant.CST_RL_SPONSOR
        },
        columns: [
            {display: '担保人姓名', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h ='';
            		if(isDetail==0 && rowdata.cstTypCd==1){
                    	h+='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
                    	h+="'"+"reCstNm"+"','"+rowdata.cstNm+"')";
                    	h+='"><i class="sqBtnIco_1"></i></a>';
                    	h+='&nbsp;&nbsp;&nbsp;&nbsp;';
                    }
                    if(isDetail==0 && rowdata.cstTypCd==2){
                    	h+='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
                    	h+="'"+"reCstNm"+"','"+rowdata.cstNm+"')";
                    	h+='"><i class="sqBtnIco_1"></i></a>';
                    	h+='&nbsp;&nbsp;&nbsp;&nbsp;';
                    }
            		h+='<a href="javascript:toGuarantorDetail(';
                    h+=rowdata.id;
                    h+=","+rowdata.cstTypCd;
                    h+=')">'+rowdata.cstNm+'</a>';
                return h;
            	}	
            },
            {display: '担保人身份证号', name: '', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h='';
            		if(StringUtils.isNotEmpty(rowdata.certNo)){
            			if(isDetail==0 ){
                        	h='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
                        	h+="'"+"reCertNo"+"','"+rowdata.certNo+"')";
                        	h+='"><i class="sqBtnIco_1"></i></a>';
                        	h+='&nbsp;&nbsp;&nbsp;&nbsp;';
                        	h+=rowdata.certNo;
                        }else{
                        	h = ''+rowdata.certNo+''; 
                        }
            		}
            		return h;
            	}
            },
            {display: '联系方式', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h = '';
            		if(rowdata.cstNpBscInfoVO){
            			var cstNpBscInfoVO = rowdata.cstNpBscInfoVO;
            			if(cstNpBscInfoVO && StringUtils.isNotEmpty(cstNpBscInfoVO.mp1)){
            				h = '' + cstNpBscInfoVO.mp1 + '';
            			}else if(cstNpBscInfoVO && StringUtils.isNotEmpty(cstNpBscInfoVO.mp2)){
            				h = '' + cstNpBscInfoVO.mp2 + '';
            			}
            		}else if(rowdata.cstCorpBscInfoVO){
            			var cstCorpBscInfoVO = rowdata.cstCorpBscInfoVO;
            			if(cstCorpBscInfoVO && StringUtils.isNotEmpty(cstCorpBscInfoVO.officeTel)){
            				h = '' + cstCorpBscInfoVO.officeTel + '';
            			}
            		}
            		if(isDetail==0 && StringUtils.isNotEmpty(h)){
            			var h1='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
            			h1+="'"+"reMp1"+"','"+h+"')";
                    	h1+='"><i class="sqBtnIco_1"></i></a>';
                    	h1+='&nbsp;&nbsp;&nbsp;&nbsp;'+h;
                    	return h1;
            		}
                	return h;
            	}	
            },
            {display: '联系地址', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h = '';
            		if(rowdata.cstNpBscInfoVO){
            			var cstNpBscInfoVO = rowdata.cstNpBscInfoVO;
            			if(cstNpBscInfoVO && StringUtils.isNotEmpty(cstNpBscInfoVO.homeAddr)){
            				h = '' + cstNpBscInfoVO.homeAddr + '';
            			}
            		}else if(rowdata.cstCorpBscInfoVO){
            			var cstCorpBscInfoVO = rowdata.cstCorpBscInfoVO;
            			if(cstCorpBscInfoVO && StringUtils.isNotEmpty(cstCorpBscInfoVO.officeAddr)){
            				h = '' + cstCorpBscInfoVO.officeAddr + '';
            			}
            		}
            		if(isDetail==0 && StringUtils.isNotEmpty(h)){
            			var h1='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
            			h1+="'"+"rePostAddr"+"','"+h+"')";
                    	h1+='"><i class="sqBtnIco_1"></i></a>';
                    	h1+='&nbsp;&nbsp;&nbsp;&nbsp;'+h;
                    	return h1;
            		}
                	return h;
            	}	
            },
            {display: '担保人婚姻状况', name: '', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h='';
            		if(StringUtils.isNotEmpty(rowdata.cstNpBscInfoVO) && StringUtils.isNotEmpty(rowdata.cstNpBscInfoVO.marStsCdNm)){
            			h = ''+rowdata.cstNpBscInfoVO.marStsCdNm+''; 
            		}
            		return h;
            	}
            },
            {display: '担保人配偶姓名', name: '', minWidth: 80,
            	render: function (rowdata, rowindex, value){
            		var h='';
            		if(StringUtils.isNotEmpty(rowdata.cstNpBscInfoVO) && StringUtils.isNotEmpty(rowdata.cstNpBscInfoVO.cstNpSocialRlVO)){
            			h = ''+rowdata.cstNpBscInfoVO.cstNpSocialRlVO.rlNm+''; 
            		}
            		if(isDetail==0 && StringUtils.isNotEmpty(h)){
            			var h1='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
            			h1+="'"+"reCstNm"+"','"+h+"')";
                    	h1+='"><i class="sqBtnIco_1"></i></a>';
                    	h1+='&nbsp;&nbsp;&nbsp;&nbsp;'+h;
                    	return h1;
            		}
            		return h;
            	},
           	}
            ],
        onBeforeEdit: function (e) {},
        onBeforeShowData: function(){SetIframe_height();},
        onAfterShowData: function(){SetIframe_height();},
        pageSize:100,
        usePagerOnLessPagesize: false,
        root: 'rows',
        record: 'total',
        hideLoadButton: true,
        width: '100%',
        height: 300,
        heightDiff: -2,
        enabledEdit: true,
        isScroll: false,
        checkbox: false,
        rownumbers: true,
        allowUnSelectRow: true,
        alternatingRow: false
    });
}

//紧急联系人初始化列表
function initLinkPersonGrid(){
	var showLinkPerson = '${showLinkPerson}';
	if(showLinkPerson==1){
		$("#ligergrid_linkPerson").ligerGrid({
			url: '<%=path%>/project/prjlinkman/initList.do',
	    	method : 'get',
	    	 parms:{
	         	prjId:_projectId
	         },
	        columns: [
	             { display: '联系人姓名', name: 'lnkNm', minWidth: 140,enabledSort:true,
	            	 render: function (rowdata, rowindex, value){
							var h='';
		            		if(StringUtils.isNotEmpty(rowdata.lnkNm)){
		            			if(isDetail==0 ){
		                        	h='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
		                        	h+="'"+"reCstNm"+"','"+rowdata.lnkNm+"')";
		                        	h+='"><i class="sqBtnIco_1"></i></a>';
		                        	h+='&nbsp;&nbsp;&nbsp;&nbsp;'+rowdata.lnkNm;
		                        }else{
		                        	h = ''+rowdata.lnkNm+''; 
		                        }
		            		}else{
		            			h = ''+rowdata.lnkNm+''; 
		            		}
		            		return h;
						}
	             },
	            { display: '联系电话', name: 'mp', minWidth: 100 ,enabledSort:true,
	            	 render: function (rowdata, rowindex, value){
							var h='';
		            		if(StringUtils.isNotEmpty(rowdata.mp)){
		            			if(isDetail==0 ){
		                        	h='<a class="sq-button-hasicon" href="javascript:toRePrjPageList(';
		                        	h+="'"+"reMp1"+"','"+rowdata.mp+"')";
		                        	h+='"><i class="sqBtnIco_1"></i></a>';
		                        	h+='&nbsp;&nbsp;&nbsp;&nbsp;'+rowdata.mp;
		                        }else{
		                        	h = ''+rowdata.mp+''; 
		                        }
		            		}else{
		            			h = ''+rowdata.mp+'';
		            		}
		            		return h;
						}	 
	            },
	            { display: '性别', name: 'genderCdNm', minWidth: 140 , enabledSort:true},
	            { display: '与承租人关系', name: 'rlCdNm', minWidth: 140 , enabledSort:true},
	            { display: '访谈记录', name: 'visRec', minWidth: 140 , enabledSort:true},
	            ],
	        pageSize:100,
	        root:'rows',
	        record:'total',
	        hideLoadButton : true,
	        width: '100%',
	        heightDiff:-2,
	        checkbox:false,
	        allowUnSelectRow: true,
	        alternatingRow: false,
	        rownumbers:true,
	        usePagerOnLessPagesize: false,
	    });
	}
}

//请求信审整体资料数据(参数:项目ID,流程实例ID)
function initCreditData(){
	if(!_projectId || !_proIntId){
		return;
	}
   	var _url = '<%=path%>/audit/audCreditInfo/getByProjectIdAndProIntId.do';
	$.ajax({
   		type: 'get',
   		dataType:'json',
   		data:{
   			projectId:_projectId,
   			proIntId:_proIntId
   		},
   		url: _url,
   		success:function(msg){
			if(msg.success == 1){
				setData(msg.data);//设置数据
   				mainData = msg.data;
			}else{
				top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
			}
		}
	});
}
	
//设置页面数据
function setData(data){
	var form = liger.get("formSet1");
	//设置数据
	$("#creditInfoId").val(data.id);//信审整体资料ID
	$("#selfTkDesc").val(data.selfTkDesc);
	$("#route").val(data.route);
	if(data.netIncome){
		$("#netIncome").val(data.netIncome/100);
	}
	if(data.highEasonCharterdBus){
		$("#highEasonCharterdBus").val(data.highEasonCharterdBus/100);
	}
	if(data.peakEasonCharterdBus){
		$("#peakEasonCharterdBus").val(data.peakEasonCharterdBus/100);
	}
	$("#otherFeePct").val(data.otherFeePct);
	if(data.grossIncome){
		$("#grossIncome").val(data.grossIncome/100);
	}
	$("#otherInfo").val(data.otherInfo);
	$("#qualificationOpn").val(data.qualificationOpn);
	$("#infomationOpn").val(data.infomationOpn);
	$("#schemeOpn").val(data.schemeOpn);
	$("#riskOpn").val(data.riskOpn);
	$("#goodsDisp").val(data.goodsDisp);
	if(StringUtils.isEmpty(data.offLionContract)){
		$("#offLionContract").val("线下合同齐全合规，交车验收单、车钥匙、合格证已上传。");
	}else{
		$("#offLionContract").val(data.offLionContract);
	}
	$("#pbcCreditInfo").val(data.pbcCreditInfo);
	$("#tripCreditInfo").val(data.tripCreditInfo);
	$("#ownCreditInfo").val(data.ownCreditInfo);
	form.setData({
		profitCd:data.profitCd,
		experience:data.experience,
		mainGoodsCd:data.mainGoodsCd,
		goodsResCd:data.goodsResCd,
		settlementTypeCd:data.settlementTypeCd,
		driverInfo:data.driverInfo,
		secondPayResCd:data.secondPayResCd,
		processOpinionCd:data.processOpinionCd,
		cstMgrLvlCd:data.cstMgrLvlCd,
		localLiveTmCd:data.localLiveTmCd,
		riskCtrlLvlCd:data.riskCtrlLvlCd,
		firstPayResCd:data.firstPayResCd,
		isMeetPolicyCd:data.isMeetPolicyCd,
	});
	if(null!=data.isNew){
		form.setData({
			isNew:data.isNew.toString(),
		});
	}
	
	getGoods();//手动调用
	setRgnProvCdUpdataValue(data.actualAreaCd);//实际区域
	setRegionSelectDataChange();
	
};
//主货物大类change事件
function getGoods(){
	var _PCode = $("#mainGoodsCd").val();
	if(!_PCode) return;
	$.ajax({
		type: 'post',
		dataType:'json',
		data:{PCode:_PCode},
		url: '<%=path%>/audit/audCreditInfo/getGoodsTypJSON.do',
		success:function(msg){
			if(msg.success == 1){
				//主运输货物
				var goods = $("#goods");
				if(goods.length){
					$("#goods").empty();
					$("#goods").append("<option value=''>请选择</option>");
					$.each(msg.data,function(index,obj) {
						var option = "<option value='"+obj.key+"'>"+obj.value+"</option>";
							$(option).appendTo("#goods");
							liger.get("goods").setSelect();
					});
					$("#goods").add_ligerFormEditor();
				}
				SetIframe_height();
				if(mainData && mainData.goods){
					var form = liger.get("formSet1");
					form.setData({
						goods:mainData.goods,
					});
					checkGoods();//手动调用
				}
			}else{
				top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
			}
		}
	});
}
function checkGoods(){
	var goods = liger.get("goods");
	if(goods){
		var selectGoods = goods.getSelected();
		if(selectGoods){
			if(selectGoods.text=='其他'){
				$("#goodsDispDIV").show();
			}else{
				$("#goodsDispDIV").hide();
			}
		}
	}
}

//车辆运营模块动态字段DIV
function refleshDyncPrdOperateDiv(){
	var _bizTypCd = "PRD0001";
	var _bizCd = _prdTypCd.substring(0,3);
	//刷新车辆运营组件
	var _url_1 = '<%=path%>/audit/audCreditInfo/toPrdOperateDynamicFldPage.do';
	$("#dyncPrdOperateDiv").load(_url_1,{bizTypCd:_bizTypCd, bizCd:_bizCd},function(responseText,textStatus){
		$("#formSet1").check_ligerFormEditor();
		SetIframe_height();
		setSelectData();
		if(isDetail==1){
			disabledCreditDyncFiled();//禁用动态字段标签
		}
	});
}
//设置动态下拉框的数据
function setSelectData(){
	//查询货物大类(参数:顶级代码层级)
	$.ajax({
		type: 'post',
		dataType:'json',
		data:{lvl:1},
		url: '<%=path%>/audit/audCreditInfo/getGoodsTypJSON.do',
		success:function(msg){
			if(msg.success == 1){
				//去程货物大类
				var tripGoodsMainCd = $("#tripGoodsMainCd");
				if(tripGoodsMainCd.length){
					$("#tripGoodsMainCd").empty();
					$("#tripGoodsMainCd").append("<option value=''>请选择</option>");
					$.each(msg.data,function(index,obj) {
						var option = "<option value='"+obj.key+"'>"+obj.value+"</option>";
							$(option).appendTo("#tripGoodsMainCd");
							liger.get("tripGoodsMainCd").setSelect();
					});
					$("#tripGoodsMainCd").add_ligerFormEditor();
				}
				//回程货物大类
				var returnGoodsMainCd = $("#returnGoodsMainCd");
				if(returnGoodsMainCd.length){
					$("#returnGoodsMainCd").empty();
					$("#returnGoodsMainCd").append("<option value=''>请选择</option>");
					$.each(msg.data,function(index,obj) {
						var option = "<option value='"+obj.key+"'>"+obj.value+"</option>";
							$(option).appendTo("#returnGoodsMainCd");
							liger.get("returnGoodsMainCd").setSelect();
					});
					$("#returnGoodsMainCd").add_ligerFormEditor();
				}
				//主货物大类
				var mainGoodsCd = $("#mainGoodsCd");
				if(mainGoodsCd.length){
					$("#mainGoodsCd").empty();
					$("#mainGoodsCd").append("<option value=''>请选择</option>");
					$.each(msg.data,function(index,obj) {
						var option = "<option value='"+obj.key+"'>"+obj.value+"</option>";
							$(option).appendTo("#mainGoodsCd");
							liger.get("mainGoodsCd").setSelect();
					});
					$("#mainGoodsCd").add_ligerFormEditor();
				}
				SetIframe_height();
				//goodsFlag = 1;
				setPrdOperateData();//设置车辆运营信息
			}else{
				top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
			}
		}
	});
	//查询车辆用途种类下拉数据
	//因为正式系统只有车辆用途大类 所以数据字典未分层级定义 无需动态获取数据 直接定义在动态字段属性里即可 若以后有需求再说
	//车辆用途小类注释掉 有需求再说	
	
};
//var goodsFlag = 0;
//去程货物大类onchange事件 
function getTripGoodsSubCd(){
	var _PCode = $("#tripGoodsMainCd").val();
	if(!_PCode) return;
	$.ajax({
		type: 'post',
		dataType:'json',
		data:{PCode:_PCode},
		url: '<%=path%>/audit/audCreditInfo/getGoodsTypJSON.do',
		success:function(msg){
			if(msg.success == 1){
				//去程货物小类
				var tripGoodsSubCd = $("#tripGoodsSubCd");
				if(tripGoodsSubCd.length){
					$("#tripGoodsSubCd").empty();
					$("#tripGoodsSubCd").append("<option value=''>请选择</option>");
					$.each(msg.data,function(index,obj) {
						var option = "<option value='"+obj.key+"'>"+obj.value+"</option>";
							$(option).appendTo("#tripGoodsSubCd");
							liger.get("tripGoodsSubCd").setSelect();
					});
					$("#tripGoodsSubCd").add_ligerFormEditor();
				}
				SetIframe_height();
				if(mainData){
					var form = liger.get("formSet1");
					form.setData({
						tripGoodsSubCd:mainData.tripGoodsSubCd,
					});
				}
			}else{
				top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
			}
		}
	});
}
//回程货物大类onchange事件
function getReturnGoodsSubCd(){
	var _PCode = $("#returnGoodsMainCd").val();
	if(!_PCode) return;
	$.ajax({
		type: 'post',
		dataType:'json',
		data:{PCode:_PCode},
		url: '<%=path%>/audit/audCreditInfo/getGoodsTypJSON.do',
		success:function(msg){
			if(msg.success == 1){
				//回程货物小类
				var returnGoodsSubCd = $("#returnGoodsSubCd");
				if(returnGoodsSubCd.length){
					$("#returnGoodsSubCd").empty();
					$("#returnGoodsSubCd").append("<option value=''>请选择</option>");
					$.each(msg.data,function(index,obj) {
						var option = "<option value='"+obj.key+"'>"+obj.value+"</option>";
							$(option).appendTo("#returnGoodsSubCd");
							liger.get("returnGoodsSubCd").setSelect();
					});
					$("#returnGoodsSubCd").add_ligerFormEditor();
				}
				SetIframe_height();
				if(mainData){
					var form = liger.get("formSet1");
					form.setData({
						returnGoodsSubCd:mainData.returnGoodsSubCd,
					});
				}
			}else{
				top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
			}
		}
	});
}
//设置车辆运营动态字段数据
function setPrdOperateData(){
	var form = liger.get("formSet1");
	if(!mainData)return;
	form.setData({
		tripGoodsMainCd:mainData.tripGoodsMainCd,
		//tripGoodsSubCd:mainData.tripGoodsSubCd, 货物小类在货物大类改变刷新货物小类下拉数据后设置值
		returnGoodsMainCd:mainData.returnGoodsMainCd,
		//returnGoodsSubCd:mainData.returnGoodsSubCd,
		mainGoodsCd:mainData.mainGoodsCd,
		useMainTypeCd:mainData.useMainTypeCd,
		useSubTypeCd:mainData.useSubTypeCd,
		passengersCd:mainData.passengersCd,
		workTypeCd:mainData.workTypeCd,
		industryTypeCd:mainData.industryTypeCd,
		professionCd:mainData.professionCd,
		postCd:mainData.postCd,
	});
	getReturnGoodsSubCd(); //为什么不自动调用change事件呢????????????????????????????????
	getTripGoodsSubCd();
	//设置车辆运营编辑数据
	//setRgnProvCdUpdataValue(mainData.actualAreaCd);//实际区域
	//setRegionSelectDataChange();
	if(mainData.pickDate){
		var pickDate = new Date(mainData.pickDate);
		var dateStr = DateUtils.formatDate(pickDate, DateUtils.YYYY_MM_DD);
		$("#pickDate").val(dateStr);
	}
	$("#firstPaymentInfo").val(mainData.firstPaymentInfo);
	$("#equipmentRights").val(mainData.equipmentRights);
	$("#driverInfo").val(mainData.driverInfo);
	$("#startplace").val(mainData.startplace);
	$("#destination").val(mainData.destination);
	$("#tripGoods").val(mainData.tripGoods);
	$("#returnGoods").val(mainData.returnGoods);
	$("#weight").val(mainData.weight);
	$("#fareType").val(mainData.fareType);
	$("#returnNum").val(mainData.returnNum);
	$("#settlementType").val(mainData.settlementType);
	$("#monthIncome").val(mainData.monthIncomeDouble);
	$("#monthRepayment").val(mainData.monthRepaymentDouble);
	$("#distance").val(mainData.distance);
	$("#experience").val(mainData.experience);
	$("#chargingType").val(mainData.chargingType);
	$("#monthOutDays").val(mainData.monthOutDays);
	$("#workYeays").val(mainData.workYeays);
	$("#income").val(mainData.income);
	$("#secondRepayment").val(mainData.secondRepayment);
	$("#equipmentUse").val(mainData.equipmentUse);
	$("#ownLand").val(mainData.ownLand);
	$("#contractLand").val(mainData.contractLand);
	$("#contractYeays").val(mainData.contractYeays);
	$("#contractPrice").val(mainData.contractPrice);
	$("#growCrops").val(mainData.growCrops);
	$("#yield").val(mainData.yield);
	if(mainData.saleTime){
		var saleTime = new Date(mainData.saleTime);
		var dateStr = DateUtils.formatDate(saleTime, DateUtils.YYYY_MM_DD);
		$("#saleTime").val(dateStr);
	}
	$("#salePrice").val(mainData.salePrice);
	$("#grossIncome").val(mainData.grossIncome);
	$("#netIncome").val(mainData.netIncome);
	$("#workArea").val(mainData.workArea);
	$("#workRange").val(mainData.workRange);
	$("#workSize").val(mainData.workSize);
	$("#workPrice").val(mainData.workPrice);
	$("#workIncome").val(mainData.workIncome);
	if(mainData.workTime){
		var workTime = new Date(mainData.workTime);
		var dateStr = DateUtils.formatDate(workTime, DateUtils.YYYY_MM_DD);
		$("#workTime").val(dateStr);
	}
};	
	
//保存信审整体资料信息
function addCreditInfo(){
    var form = liger.get("formSet1");
    if (!form.valid()) {
    	top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO , SQ_type: "warning" });
           return false;
       }
    var data = form.getData();
    data["actualAreaCd"] = getRgnProvCd();//获取省代码(实际区域)
    data["projectId"] = _projectId;//项目ID
    data["proIntId"] = _proIntId;//流程实例ID
    data["prdTypCd"] = _prdTypCd;//刷新动态字段的产品类型依据
    
    data["taskDefKey"] = _taskDefKey;//节点KEY
    data["taskNm"] = _taskNm;//节点名称
    
    if(truckGrid){
	    data["truckInfo"] = JSON.stringify(truckGrid.getData());//卡车列表信息
    }
    if(tkBusGrid){
	    data["tkBusInfo"] = JSON.stringify(tkBusGrid.getData());//卡车类客车列表信息
    }
    if(carGrid){
	    data["carInfo"] = JSON.stringify(carGrid.getData());//乘用车列表信息
    }
    if(busGrid){
	    data["busInfo"] = JSON.stringify(busGrid.getData());//专车列表信息
    }
    if(farmGrid){
	    data["farmInfo"] = JSON.stringify(farmGrid.getData());//农机列表信息
    }
    if(xnyBusGrid){
	    data["xnyBusInfo"] = JSON.stringify(xnyBusGrid.getData());//新能源客车列表信息
    }
    if(xnyTkGrid){
	    data["xnyTkInfo"] = JSON.stringify(xnyTkGrid.getData());//新能源专用车列表信息
    }
    if(szGrid){
	    data["szInfo"] = JSON.stringify(szGrid.getData());//上装产品列表信息
    }
    
    var id = $("#creditInfoId").val();
       var url = '<%=path%>/audit/audCreditInfo/add.do';
       if(id != ""){
       	url = '<%=path%>/audit/audCreditInfo/modify.do';
       	data["id"]= id;
       }
      var wait_dialog;
    $.ajax({
		type: 'post',
		dataType:'json',
		data:data,
		url: url,
		beforeSend: function(){
	          wait_dialog=top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
	     },
		success:function(msg){
			 wait_dialog.close();
			 if(msg.success == 1){
				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "success"});
				 if(msg.data){
					 $("#creditInfoId").val(msg.data);
				 }
				 //TODO
				 //保存成功需要刷新产品列表
				if(truckGrid){
					truckGrid.reload();
			    }
			    if(tkBusGrid){
			    	tkBusGrid.reload();
			    }
			    if(carGrid){
			    	carGrid.reload();
			    }
			    if(busGrid){
			    	busGrid.reload();
			    }
			    if(farmGrid){
			    	farmGrid.reload();
			    }
			    if(xnyBusGrid){
			    	xnyBusGrid.reload();
			    }
			    if(xnyTkGrid){
			    	xnyTkGrid.reload();
			    }
			    if(szGrid){
			    	szGrid.reload();
			    }
			 }else{
				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
			 }
		}
	});
}
	
//设备大类
var equCategoryCdListJSON = [];
<c:if test="${not empty equCategoryCdListJSON}"> equCategoryCdListJSON = ${equCategoryCdListJSON}; </c:if>
//车辆级别
var carLevelCdListJSON = [];
<c:if test="${not empty carLevelCdListJSON}"> carLevelCdListJSON = ${carLevelCdListJSON}; </c:if>
//农机设备大类
var farmEquCategoryCdListJSON = [];
<c:if test="${not empty farmEquCategoryCdListJSON}"> farmEquCategoryCdListJSON = ${farmEquCategoryCdListJSON}; </c:if>

//初始化卡车产品列表数据--truck
function initTruckList(){
	if(!_projectId)return;
	$("#truck0").show();
	truckGrid = $("#ligergrid_fee_truck").ligerGrid({
        url: '<%=path%>/project/audit/initPrjPrdList.do',
        method: 'get',
        parms:{
        	prjId:_projectId,
   			proIntId:_proIntId,
        	audPrjPrdListFlag:AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_TK
        },
        columns: [
            {display: '设备大类', name: 'audCarInfoVO.equCategoryCd',
                editor: {
                    type: 'select',
                    data: equCategoryCdListJSON,
                    valueField: 'key',
                    textField: 'value'
                },
                valueField: 'audCarInfoVO.equCategoryCd',
                textField: 'audCarInfoVO.equCategoryCdNm',
                render: function (item) {
                    return item.audCarInfoVO.equCategoryCdNm;
                }
            },
            {display: '厂商',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toMfrDetail(';
                        h+="'"+rowdata.mfrId+"'";
                        //h+=",'ligergrid_bankacc'";
                        if(StringUtils.isNotEmpty(rowdata.mfrNm)){
	                        h+=')">'+rowdata.mfrNm+'</a>'
                        }else{
	                        h+=')"></a>'
                        }
                    return h;
            	}	
            },
            {display: '供应商',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
            		var h="";
                 	if(rowdata.splId){
                   		if(rowdata.splInfoVO&&rowdata.splInfoVO.audStsCd){
							if(rowdata.splInfoVO.audStsCd!=FlowConstant.FLOW_CHECK_STATE_PASS){
	  		                    	h+='<i class="ico_flasher"></i>';
							}
						}	                    		
                     	h+='<a href="javascript:toSplDetail(';
                        h+="'"+rowdata.splId+"'";
                        if(StringUtils.isNotEmpty(rowdata.splNm)){
	                        h+=')">'+rowdata.splNm+'</a>';
                        }else{
	                        h+=')"></a>';
                        }
                 	}
                 	return h;
            	}	
            },
            {display: '设备名',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toPrdDetail(';
                        h+="'"+rowdata.id+"'";
                        //h+=",'ligergrid_bankacc'";
                        if(StringUtils.isNotEmpty(rowdata.prdNm)){
	                        h+=')">'+rowdata.prdNm+'</a>'
                        }else{
	                        h+=')"></a>'
                        }
                    return h;
            	}	
            },
            {display: '设备类型',align:'left', name: 'prdTypCdNm' },
            {display: '产品编码',isEllipsis:false,align:'left', name: 'prdDtlId' },//卡车类取产品明细ID,乘用车客车产品ID
            {display: '品牌',align:'left', name: 'brCdNm' },
            {display: '型号',isEllipsis:false,align:'left', name: 'prdMdl',
            	render: function (rowdata, rowindex, value){
            		var h = '';
                    if(rowdata.id){
	            		if(rowdata.prdBscInfoVO&&rowdata.prdBscInfoVO.audStsCd){
	            			if(rowdata.prdBscInfoVO.audStsCd!=FlowConstant.FLOW_CHECK_STATE_PASS){
		                    	h+='<i class="ico_flasher"></i>';
		                    }
	            		}
	           		    h+='<a href="javascript:toPrdDetail(';
	                    h+="'"+rowdata.id+"'";
	                    if(StringUtils.isNotEmpty(value)){
		                    h+=')">'+value+'</a>'
	                    }else{
		                    h+=')"></a>'
	                    }
                    }
                    return h;
            	}
            },
            {display: '是否新车', name: 'isNewNm' },
           /*  {display: '使用期限(月)', name: 'usedPd' }, */
            {display: '单价',align:'right', name: 'guidePc' },
            {display: '数量',align:'right', name: 'prdQty' },
            {display: '小计',align:'right', name: 'prdAmt' },
            {display: '留购价',align:'right', name: 'purchaseFeeAmtSum' },
            //getIrrPctColumn(),
            getOperateColumn()
            ],
        onBeforeSubmitEdit: function (e) {
        	/* if(e.column.name=="irrPct"){
        		top.$.ligerDialog.confirm("确认修改收益率吗?", function (flag) {
        				if(!flag){
        					return;
        				}else{
        					modifyIrrPct(e.value,e.record.id);
        				}
        			});
        	} */
        },
        onBeforeEdit: function (e) {
        	if(isDetail==1){
        		e.column.editor.readonly=true;
        	}
        },
        onBeforeShowData: function(){SetIframe_height();},
        onAfterShowData: function(){SetIframe_height();},
        pageSize:100,
        usePagerOnLessPagesize: false,
        root: 'rows',
        record: 'total',
        hideLoadButton: true,
        width: '100%',
        height: 300,
        heightDiff: -2,
        fixedCellHeight:false,
        enabledEdit: true,
        isScroll: false,
        checkbox: false,
        rownumbers: true,
        allowUnSelectRow: true,
        alternatingRow: false
    });
}
//卡车产品列表:收益率列
function getIrrPctColumn(){
	if(isDetail==1){
		return {display: '收益率(%)',align:'right', name: 'irrPct', type: 'numberbox', width:100 }
	}else{
		return {display: '收益率(%)',align:'right', name: 'irrPct', type: 'numberbox', width:100,
	    	editor: {type: 'number',
	    			 precision:2,
	    			 toFix:true,
	                 onToFix:function(){
	                     top.$.ligerDialog.SQalert({SQ_type: "warning",content: "小数点后面最多2位小数！"});
	                 }
	    	} 
	    }
	}
}
//卡车产品列表:操作列
function getOperateColumn(){
	if(isDetail==0){
		return {display: '操作',width: 100,align:'left',
	    	render: function (rowdata, rowindex, value){
	   			var h='<a class="sq-button-hasicon" href="javascript:toCorePrcBookAdd(';
	                h+="'"+rowdata.id+"'";
	                h+=')"><i class="sqBtnIco_4"></i>校准核价</a>';
	            var g='<a class="sq-button-hasicon" href="javascript:modifyIrrPct(';
	        		g+="'"+rowdata.irrPct+"'";
	        		g+=",'"+rowdata.id+"'";
	                g+=')"><i class="sqBtnIco_4"></i>修改收益率</a>';
	            //TODO return g+h;
	            return h;
	    	}
		}
	}else{
		return {display: '操作',width: 100,align:'left',
	    	render: function (rowdata, rowindex, value){
	   			var h='<a class="sq-button-hasicon" href="javascript:toCorePrcBookAdd(';
	                h+="'"+rowdata.id+"'";
	                h+=')"><i class="sqBtnIco_4"></i>核价信息</a>';
	            return h;
	    	}
		}
	}
}
//信审修改收益率
function modifyIrrPct(_irrPct,_prjPrdId){
	if(!_irrPct || !_prjPrdId)return;
	top.$.ligerDialog.confirm("确认修改收益率吗?", function (flag) {
		if(!flag){
			return;
		}else{
			$.ajax({
				type: 'post',
				dataType:'json',
				data:{
					irrPct:_irrPct,
					id:_prjPrdId
				},
				url: '<%=path%>/project/audit/modifyPrjPrdIrrPct.do',
				beforeSend: function(){
			          wait_dialog=top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
			     },
				success:function(msg){
					 wait_dialog.close();
					 if(msg.success == 1){
						 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "success"});
					 }else{
						 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
					 }
				}
			});
		}
	});
}
function toPrjDetail(){
	if(!_projectId)return;
	// 信审初审节点flag
	Add_navTab("prjDetail"+_projectId, "项目信息", '<%=path%>/project/prjbscinfo/toModifyPage.do?detailFlag=true&id='+_projectId + '&fromCAFlag=' + fromCAFlag);
}
function toMfrDetail(_mfrId){
	if(!_mfrId || _mfrId==null || _mfrId=="null")return;
	Add_navTab("mfrDetail"+_mfrId, "项目产品厂商信息", '<%=path%>/product/mfrInfo/toDetailPage.do?id='+_mfrId);
}
function toSplDetail(_splId){
	if(!_splId || _splId==null || _splId=="null")return;
	Add_navTab("splDetail"+_splId, "项目产品供应商信息", '<%=path%>/product/splInfo/toDetailPage.do?id='+_splId);
}
function toPrdDetail(_prjPrdId){
	if(!_prjPrdId || _prjPrdId==null || _prjPrdId=="null")return;
	///project/prjprdbscinfo/toModifyPage.do?id=161031000000065&&prjId=160829000000052&&detailFlag=true
	Add_navTab("prjPrdDetail"+_prjPrdId, "项目产品详细信息", '<%=path%>/project/prjprdbscinfo/toModifyPage.do?detailFlag=true&&id=' +_prjPrdId+ '&&prjId=' +_projectId);
}
function toTempPrdDetail(_prjPrdId){
	if(!_prjPrdId || _prjPrdId==null || _prjPrdId=="null")return;
	///project/prjprdbscinfo/toModifyPage.do?id=161031000000065&&prjId=160829000000052&&detailFlag=true
	Add_navTab("prjPrdDetail"+_prjPrdId, "项目产品详细信息", '<%=path%>/project/prjprdbscinfo/toPrjPrdGHModifyPage.do?detailFlag=true&&id=' +_prjPrdId+ '&&prjId=' +_projectId);
}

//初始化乘用车产品列表数据--car
function initCarList(){
	if(!_projectId)return;
	$("#car0").show();
	carGrid = $("#ligergrid_fee_car").ligerGrid({
        url: '<%=path%>/project/audit/initPrjPrdList.do',
        method: 'get',
        parms:{
        	prjId:_projectId,
        	proIntId:_proIntId,
        	audPrjPrdListFlag:AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_CAR
        },
        columns: [
            {display: '车辆级别', name: 'audCarInfoVO.carLevelCd', minWidth: 100,
                editor: {
                    type: 'select',
                    data: carLevelCdListJSON,
                    valueField: 'key',
                    textField: 'value'
                },
                valueField: 'audCarInfoVO.carLevelCd',
                textField: 'audCarInfoVO.carLevelCdNm',
                render: function (item) {
                    return item.audCarInfoVO.carLevelCdNm;
                }
            },
            {display: '供应商', minWidth: 150,align:'left',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toSplDetail(';
                        h+="'"+rowdata.splId+"'";
                        //h+=",'ligergrid_bankacc'";
                        h+=')">'+rowdata.splNm+'</a>'
                        if(rowdata.splNm){
                        	return h;
                        }
                    return "";
            	}	
            },
            {display: '设备名称',align:'left', name: 'prdNm', minWidth: 100 },
            {display: '产品编码',align:'left', name: 'prdId' },//卡车类取产品明细ID,乘用车客车产品ID
            {display: '品牌', name: 'brCdNm', minWidth: 80 },
            {display: '是否新车', name: 'isNewNm', minWidth: 80 },
            {display: '使用期限(月)',align:'right', name: 'usedPd', minWidth: 80 },
            {display: '单价', align:'right',name: 'guidePc', minWidth: 80 },
            {display: '数量', align:'right',name: 'prdQty', minWidth: 80 },
            {display: '小计', align:'right',name: 'prdAmt', minWidth: 80 },
            {display: '留购价', align:'right',name: 'purchaseFeeAmtSum', minWidth: 80 },
            ],
        onBeforeSubmitEdit: function (e) {
        	//alert("onbeforeSubmit");
        },
        onBeforeEdit: function (e) {
            //alert("obeforeEdit");
        },
        onAfterShowData:function (data){
        	SetIframe_height();
        },
        pageSize:100,
        usePagerOnLessPagesize: false,
        root: 'rows',
        record: 'total',
        hideLoadButton: true,
        width: '100%',
        height: 300,
        heightDiff: -2,
        enabledEdit: true,
        isScroll: false,
        checkbox: false,
        rownumbers: true,
        allowUnSelectRow: true,
        alternatingRow: false
    });
}
//初始化卡车客车产品列表数据--tk_bus
function initTkBusList(){
	if(!_projectId)return;
	$("#tk_bus0").show();
	tkBusGrid = $("#ligergrid_fee_tk_bus").ligerGrid({
        url: '<%=path%>/project/audit/initPrjPrdList.do',
        method: 'get',
        parms:{
        	prjId:_projectId,
   			proIntId:_proIntId,
        	audPrjPrdListFlag:AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_TK_BUS
        },
        columns: [
            {display: '设备大类', name: 'audCarInfoVO.equCategoryCd',
                editor: {
                    type: 'select',
                    data: equCategoryCdListJSON,
                    valueField: 'key',
                    textField: 'value'
                },
                valueField: 'audCarInfoVO.equCategoryCd',
                textField: 'audCarInfoVO.equCategoryCdNm',
                render: function (item) {
                    return item.audCarInfoVO.equCategoryCdNm;
                }
            },
            {display: '厂商',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toMfrDetail(';
                        h+="'"+rowdata.mfrId+"'";
                        //h+=",'ligergrid_bankacc'";
                        if(StringUtils.isNotEmpty(rowdata.mfrNm)){
	                        h+=')">'+rowdata.mfrNm+'</a>'
                        }else{
	                        h+=')"></a>'
                        }
                    return h;
            	}	
            },
            {display: '供应商',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
            		var h="";
                 	if(rowdata.splId){
                   		if(rowdata.splInfoVO&&rowdata.splInfoVO.audStsCd){
							if(rowdata.splInfoVO.audStsCd!=FlowConstant.FLOW_CHECK_STATE_PASS){
	  		                    	h+='<i class="ico_flasher"></i>';
							}
						}	                    		
                     	h+='<a href="javascript:toSplDetail(';
                        h+="'"+rowdata.splId+"'";
                        if(StringUtils.isNotEmpty(rowdata.splNm)){
	                        h+=')">'+rowdata.splNm+'</a>';
                        }else{
	                        h+=')"></a>';
                        }
                 	}
                 	return h;
            	}	
            },
            {display: '设备名',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toPrdDetail(';
                        h+="'"+rowdata.id+"'";
                        //h+=",'ligergrid_bankacc'";
                        if(StringUtils.isNotEmpty(rowdata.prdNm)){
	                        h+=')">'+rowdata.prdNm+'</a>'
                        }else{
	                        h+=')"></a>'
                        }
                    return h;
            	}	
            },
            {display: '设备类型',align:'left', name: 'prdTypCdNm' },
            {display: '产品编码',isEllipsis:false,align:'left', name: 'prdDtlId' },//卡车类取产品明细ID,乘用车客车产品ID
            {display: '品牌',align:'left', name: 'brCdNm' },
            {display: '型号',isEllipsis:false,align:'left', name: 'prdMdl',
            	render: function (rowdata, rowindex, value){
            		var h = '';
                    if(rowdata.id){
	            		if(rowdata.prdBscInfoVO&&rowdata.prdBscInfoVO.audStsCd){
	            			if(rowdata.prdBscInfoVO.audStsCd!=FlowConstant.FLOW_CHECK_STATE_PASS){
		                    	h+='<i class="ico_flasher"></i>';
		                    }
	            		}
	           		    h+='<a href="javascript:toPrdDetail(';
	                    h+="'"+rowdata.id+"'";
	                    if(StringUtils.isNotEmpty(value)){
		                    h+=')">'+value+'</a>'
	                    }else{
		                    h+=')"></a>'
	                    }
                    }
                    return h;
            	}	
            },
            {display: '是否新车', name: 'isNewNm' },
           /*  {display: '使用期限(月)', name: 'usedPd' }, */
            {display: '单价',align:'right', name: 'guidePc' },
            {display: '数量',align:'right', name: 'prdQty' },
            {display: '小计',align:'right', name: 'prdAmt' },
            {display: '留购价',align:'right', name: 'purchaseFeeAmtSum' },
            //getIrrPctColumn(),
            getOperateColumn()
            ],
        onBeforeSubmitEdit: function (e) {
        	/* if(e.column.name=="irrPct"){
        		top.$.ligerDialog.confirm("确认修改收益率吗?", function (flag) {
        				if(!flag){
        					return;
        				}else{
        					modifyIrrPct(e.value,e.record.id);
        				}
        			});
        	} */
        },
        onBeforeEdit: function (e) {
        	if(isDetail==1){
        		e.column.editor.readonly=true;
        	}
        },
        onBeforeShowData: function(){SetIframe_height();},
        onAfterShowData: function(){SetIframe_height();},
        pageSize:100,
        usePagerOnLessPagesize: false,
        root: 'rows',
        record: 'total',
        hideLoadButton: true,
        width: '100%',
        height: 300,
        heightDiff: -2,
        fixedCellHeight:false,
        enabledEdit: true,
        isScroll: false,
        checkbox: false,
        rownumbers: true,
        allowUnSelectRow: true,
        alternatingRow: false
    });
}
//初始化专车产品列表数据--bus
function initBusList(){
	if(!_projectId)return;
	$("#bus0").show();
	busGrid = $("#ligergrid_fee_bus").ligerGrid({
        url: '<%=path%>/project/audit/initPrjPrdList.do',
        method: 'get',
        parms:{
        	prjId:_projectId,
        	proIntId:_proIntId,
        	audPrjPrdListFlag:AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_BUS
        },
        columns: [
			{display: '车辆级别', name: 'audCarInfoVO.carLevelCd', minWidth: 100,
			    editor: {
			        type: 'select',
			        data: carLevelCdListJSON,
			        valueField: 'key',
			        textField: 'value'
			    },
			    valueField: 'audCarInfoVO.carLevelCd',
			    textField: 'audCarInfoVO.carLevelCdNm',
			    render: function (item) {
			        return item.audCarInfoVO.carLevelCdNm;
			    }
			},
			{display: '供应商',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
            		var h="";
                 	if(rowdata.splId){
                   		if(rowdata.splInfoVO&&rowdata.splInfoVO.audStsCd){
							if(rowdata.splInfoVO.audStsCd!=FlowConstant.FLOW_CHECK_STATE_PASS){
	  		                    	h+='<i class="ico_flasher"></i>';
							}
						}	                    		
                     	h+='<a href="javascript:toSplDetail(';
                        h+="'"+rowdata.splId+"'";
                        if(StringUtils.isNotEmpty(rowdata.splNm)){
	                        h+=')">'+rowdata.splNm+'</a>';
                        }else{
	                        h+=')"></a>';
                        }
                 	}
                 	return h;
            	}	
            },
            {display: '设备名',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toPrdDetail(';
                        h+="'"+rowdata.id+"'";
                        //h+=",'ligergrid_bankacc'";
                        if(StringUtils.isNotEmpty(rowdata.prdNm)){
	                        h+=')">'+rowdata.prdNm+'</a>'
                        }else{
	                        h+=')"></a>'
                        }
                    return h;
            	}	
            },
            /* {display: '设备类型',align:'left', name: 'prdTypCdNm' }, */
            {display: '产品编码',isEllipsis:false,align:'left', name: 'prdId' },//卡车类取产品明细ID,乘用车客车产品ID
            {display: '品牌', name: 'brCdNm' },
            {display: '型号', name: 'prdMdl',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toPrdDetail(';
                        h+="'"+rowdata.id+"'";
                        if(StringUtils.isNotEmpty(rowdata.prdMdl)){
	                        h+=')">'+rowdata.prdMdl+'</a>'
                        }else{
	                        h+=')"></a>'
                        }
                    return h;
            	}
            },
            /* {display: '型号',isEllipsis:false,align:'left', name: 'prdMdl',
            	render: function (rowdata, rowindex, value){
            		var h = '';
                    if(rowdata.id){
	            		if(rowdata.prdBscInfoVO&&rowdata.prdBscInfoVO.audStsCd){
	            			if(rowdata.prdBscInfoVO.audStsCd!=FlowConstant.FLOW_CHECK_STATE_PASS){
		                    	h+='<i class="ico_flasher"></i>';
		                    }
	            		}
	           		    h+='<a href="javascript:toPrdDetail(';
	                    h+="'"+rowdata.id+"'";
	                    h+=')">'+value+'</a>'
                    }
                    return h;
            	}	
            }, */
            {display: '是否新车', name: 'isNewNm' },
            {display: '单价',align:'right', name: 'guidePc' },
            {display: '数量',align:'right', name: 'prdQty' },
            {display: '小计',align:'right', name: 'prdAmt' },
            {display: '留购价',align:'right', name: 'purchaseFeeAmtSum' },
            getOperateColumn()
            /* {display: '车身长度',align:'right', name: 'prjPrdCarInfoVO.carLen', minWidth: 80 },
            {display: '座位数',align:'right', name: 'prjPrdCarInfoVO.seatQtyCdNm', minWidth: 80 },
            {display: '排量',align:'right', name: 'prjPrdCarInfoVO.outVol', minWidth: 80 },
            {display: '驱动',align:'right', name: 'prjPrdCarInfoVO.drvTypCdNm', minWidth: 80 },
            {display: '动力方式', name: 'prjPrdCarInfoVO.powerTypCdNm', minWidth: 80 },
            {display: '是否新车', name: 'isNewNm', minWidth: 50 },
            {display: '使用期限(月)',align:'right', name: 'usedPd', minWidth: 50 },
            {display: '留购价',align:'right', name: 'purchaseFeeAmtSum', minWidth: 80 },
            {display: '指导价',align:'right', name: 'guidePc', minWidth: 80 },
            {display: '数量',align:'right', name: 'prdQty', minWidth: 50 },
            {display: '小计',align:'right', name: 'prdAmt', minWidth: 80 }, */
            ],
        onBeforeSubmitEdit: function (e) {
        	//alert("onbeforeSubmit");
        },
        onBeforeEdit: function (e) {
            //alert(JSON.stringify(e));
        	if(isDetail==1){
        		e.column.editor.readonly=true;
        	}
        },
        onBeforeShowData: function(){SetIframe_height();},
        onAfterShowData: function(){SetIframe_height();},
        pageSize:100,
        usePagerOnLessPagesize: false,
        root: 'rows',
        record: 'total',
        hideLoadButton: true,
        width: '100%',
        height: 300,
        heightDiff: -2,
        fixedCellHeight:false,
        enabledEdit: true,
        isScroll: false,
        checkbox: false,
        rownumbers: true,
        allowUnSelectRow: true,
        alternatingRow: false
    });
}

//初始化  新能源客车  产品列表数据
function initXnyBusList(){
	if(!_projectId)return;
	$("#xnyBus0").show();
	xnyBusGrid = $("#ligergrid_fee_xny_bus").ligerGrid({
        url: '<%=path%>/project/audit/initPrjPrdList.do',
        method: 'get',
        parms:{
        	prjId:_projectId,
   			proIntId:_proIntId,
        	audPrjPrdListFlag:AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_XNY_BUS
        },
        columns: [
            {display: '设备大类', name: 'audCarInfoVO.equCategoryCd',
                editor: {
                    type: 'select',
                    data: equCategoryCdListJSON,
                    valueField: 'key',
                    textField: 'value'
                },
                valueField: 'audCarInfoVO.equCategoryCd',
                textField: 'audCarInfoVO.equCategoryCdNm',
                render: function (item) {
                    return item.audCarInfoVO.equCategoryCdNm;
                }
            },
            {display: '厂商',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toMfrDetail(';
                        h+="'"+rowdata.mfrId+"'";
                        //h+=",'ligergrid_bankacc'";
                        if(StringUtils.isNotEmpty(rowdata.mfrNm)){
	                        h+=')">'+rowdata.mfrNm+'</a>'
                        }else{
	                        h+=')">'+''+'</a>'
                        }
                    return h;
            	}	
            },
            {display: '供应商',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
            		var h="";
                 	if(rowdata.splId){
                   		if(rowdata.splInfoVO&&rowdata.splInfoVO.audStsCd){
							if(rowdata.splInfoVO.audStsCd!=FlowConstant.FLOW_CHECK_STATE_PASS){
	  		                    	h+='<i class="ico_flasher"></i>';
							}
						}	                    		
                     	h+='<a href="javascript:toSplDetail(';
                        h+="'"+rowdata.splId+"'";
                        if(StringUtils.isNotEmpty(rowdata.splNm)){
	                        h+=')">'+rowdata.splNm+'</a>';
                        }else{
	                        h+=')"></a>';
                        }
                 	}
                 	return h;
            	}	
            },
            {display: '设备名',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toPrdDetail(';
                        h+="'"+rowdata.id+"'";
                        //h+=",'ligergrid_bankacc'";
                        if(StringUtils.isNotEmpty(rowdata.prdNm)){
	                        h+=')">'+rowdata.prdNm+'</a>'
                        }else{
	                        h+=')"></a>'
                        }
                    return h;
            	}	
            },
            {display: '设备类型',align:'left', name: 'prdTypCdNm' },
            {display: '产品编码',isEllipsis:false,align:'left', name: 'prdId' },//卡车类取产品明细ID,乘用车客车产品ID
            {display: '品牌',align:'left', name: 'brCdNm' },
            {display: '型号',isEllipsis:false,align:'left', name: 'prdMdl',
            	render: function (rowdata, rowindex, value){
            		var h = '';
                    if(rowdata.id){
	            		if(rowdata.prdBscInfoVO&&rowdata.prdBscInfoVO.audStsCd){
	            			if(rowdata.prdBscInfoVO.audStsCd!=FlowConstant.FLOW_CHECK_STATE_PASS){
		                    	h+='<i class="ico_flasher"></i>';
		                    }
	            		}
	           		    h+='<a href="javascript:toPrdDetail(';
	                    h+="'"+rowdata.id+"'";
	                    if(StringUtils.isNotEmpty(value)){
		                    h+=')">'+value+'</a>'
	                    }else{
		                    h+=')">'+''+'</a>'
	                    }
                    }
                    return h;
            	}
            },
            {display: '是否新车', name: 'isNewNm' },
           /*  {display: '使用期限(月)', name: 'usedPd' }, */
            {display: '单价',align:'right', name: 'guidePc' },
            {display: '数量',align:'right', name: 'prdQty' },
            {display: '小计',align:'right', name: 'prdAmt' },
            {display: '留购价',align:'right', name: 'purchaseFeeAmtSum' },
            //getIrrPctColumn(),
            getOperateColumn()
            ],
        onBeforeSubmitEdit: function (e) {
        	/* if(e.column.name=="irrPct"){
        		top.$.ligerDialog.confirm("确认修改收益率吗?", function (flag) {
        				if(!flag){
        					return;
        				}else{
        					modifyIrrPct(e.value,e.record.id);
        				}
        			});
        	} */
        },
        onBeforeEdit: function (e) {
        	if(isDetail==1){
        		e.column.editor.readonly=true;
        	}
        },
        onBeforeShowData: function(){SetIframe_height();},
        onAfterShowData: function(){SetIframe_height();},
        pageSize:100,
        usePagerOnLessPagesize: false,
        root: 'rows',
        record: 'total',
        hideLoadButton: true,
        width: '100%',
        height: 300,
        heightDiff: -2,
        fixedCellHeight:false,
        enabledEdit: true,
        isScroll: false,
        checkbox: false,
        rownumbers: true,
        allowUnSelectRow: true,
        alternatingRow: false
    });
}

//初始化  新能源卡车  产品列表数据
function initXnyTkList(){
	if(!_projectId)return;
	$("#xnyTk0").show();
	xnyTkGrid = $("#ligergrid_fee_xny_tk").ligerGrid({
        url: '<%=path%>/project/audit/initPrjPrdList.do',
        method: 'get',
        parms:{
        	prjId:_projectId,
   			proIntId:_proIntId,
        	audPrjPrdListFlag:AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_XNY_TK
        },
        columns: [
            {display: '设备大类', name: 'audCarInfoVO.equCategoryCd',
                editor: {
                    type: 'select',
                    data: equCategoryCdListJSON,
                    valueField: 'key',
                    textField: 'value'
                },
                valueField: 'audCarInfoVO.equCategoryCd',
                textField: 'audCarInfoVO.equCategoryCdNm',
                render: function (item) {
                    return item.audCarInfoVO.equCategoryCdNm;
                }
            },
            {display: '厂商',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toMfrDetail(';
                        h+="'"+rowdata.mfrId+"'";
                        //h+=",'ligergrid_bankacc'";
                        if(StringUtils.isNotEmpty(rowdata.mfrNm)){
	                        h+=')">'+rowdata.mfrNm+'</a>'
                        }else{
	                        h+=')"></a>'
                        }
                    return h;
            	}	
            },
            {display: '供应商',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
            		var h="";
                 	if(rowdata.splId){
                   		if(rowdata.splInfoVO&&rowdata.splInfoVO.audStsCd){
							if(rowdata.splInfoVO.audStsCd!=FlowConstant.FLOW_CHECK_STATE_PASS){
	  		                    	h+='<i class="ico_flasher"></i>';
							}
						}	                    		
                     	h+='<a href="javascript:toSplDetail(';
                        h+="'"+rowdata.splId+"'";
                        if(StringUtils.isNotEmpty(rowdata.splNm)){
	                        h+=')">'+rowdata.splNm+'</a>';
                        }else{
	                        h+=')"></a>';
                        }
                 	}
                 	return h;
            	}	
            },
            {display: '设备名',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toPrdDetail(';
                        h+="'"+rowdata.id+"'";
                        //h+=",'ligergrid_bankacc'";
                        if(StringUtils.isNotEmpty(rowdata.prdNm)){
	                        h+=')">'+rowdata.prdNm+'</a>'
                        }else{
	                        h+=')"></a>'
                        }
                    return h;
            	}	
            },
            {display: '设备类型',align:'left', name: 'prdTypCdNm' },
            {display: '产品编码',isEllipsis:false,align:'left', name: 'prdDtlId' },//卡车类取产品明细ID,乘用车客车产品ID
            {display: '品牌',align:'left', name: 'brCdNm' },
            {display: '型号',isEllipsis:false,align:'left', name: 'prdMdl',
            	render: function (rowdata, rowindex, value){
            		var h = '';
                    if(rowdata.id){
	            		if(rowdata.prdBscInfoVO&&rowdata.prdBscInfoVO.audStsCd){
	            			if(rowdata.prdBscInfoVO.audStsCd!=FlowConstant.FLOW_CHECK_STATE_PASS){
		                    	h+='<i class="ico_flasher"></i>';
		                    }
	            		}
	           		    h+='<a href="javascript:toPrdDetail(';
	                    h+="'"+rowdata.id+"'";
	                    if(StringUtils.isNotEmpty(value)){
		                    h+=')">'+value+'</a>'
	                    }else{
		                    h+=')"></a>'
	                    }
                    }
                    return h;
            	}
            },
            {display: '是否新车', name: 'isNewNm' },
           /*  {display: '使用期限(月)', name: 'usedPd' }, */
            {display: '单价',align:'right', name: 'guidePc' },
            {display: '数量',align:'right', name: 'prdQty' },
            {display: '小计',align:'right', name: 'prdAmt' },
            {display: '留购价',align:'right', name: 'purchaseFeeAmtSum' },
            //getIrrPctColumn(),
            getOperateColumn()
            ],
        onBeforeSubmitEdit: function (e) {
        	/* if(e.column.name=="irrPct"){
        		top.$.ligerDialog.confirm("确认修改收益率吗?", function (flag) {
        				if(!flag){
        					return;
        				}else{
        					modifyIrrPct(e.value,e.record.id);
        				}
        			});
        	} */
        },
        onBeforeEdit: function (e) {
        	if(isDetail==1){
        		e.column.editor.readonly=true;
        	}
        },
        onBeforeShowData: function(){SetIframe_height();},
        onAfterShowData: function(){SetIframe_height();},
        pageSize:100,
        usePagerOnLessPagesize: false,
        root: 'rows',
        record: 'total',
        hideLoadButton: true,
        width: '100%',
        height: 300,
        heightDiff: -2,
        fixedCellHeight:false,
        enabledEdit: true,
        isScroll: false,
        checkbox: false,
        rownumbers: true,
        allowUnSelectRow: true,
        alternatingRow: false
    });
}

//初始化  上装产品  产品列表数据
function initSzList(){
	if(!_projectId)return;
	$("#sz0").show();
	szGrid = $("#ligergrid_fee_sz").ligerGrid({
        url: '<%=path%>/project/audit/initPrjPrdList.do',
        method: 'get',
        parms:{
        	prjId:_projectId,
   			proIntId:_proIntId,
        	audPrjPrdListFlag:"022"
        },
        columns: [
            {display: '设备名',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toTempPrdDetail(';
                        h+="'"+rowdata.id+"'";
                        if(StringUtils.isNotEmpty(rowdata.prdNm)){
	                        h+=')">'+rowdata.prdNm+'</a>'
                        }else{
	                        h+=')"></a>'
                        }
                    return h;
            	}	
            },
            {display: '设备类型',align:'left', name: 'prdTypCdNm' },
            {display: '供应商',isEllipsis:false,align:'left',
            	render: function (rowdata, rowindex, value){
            		var h="";
                 	if(rowdata.splId){
                   		if(rowdata.splInfoVO&&rowdata.splInfoVO.audStsCd){
							if(rowdata.splInfoVO.audStsCd!=FlowConstant.FLOW_CHECK_STATE_PASS){
	  		                    	h+='<i class="ico_flasher"></i>';
							}
						}	                    		
                     	h+='<a href="javascript:toSplDetail(';
                        h+="'"+rowdata.splId+"'";
                        if(StringUtils.isNotEmpty(rowdata.splNm)){
	                        h+=')">'+rowdata.splNm+'</a>';
                        }else{
	                        h+=')"></a>';
                        }
                 	}
                 	return h;
            	}	
            }
            ],
        onBeforeSubmitEdit: function (e) {
        },
        onBeforeEdit: function (e) {
        	if(isDetail==1){
        		e.column.editor.readonly=true;
        	}
        },
        onBeforeShowData: function(){SetIframe_height();},
        onAfterShowData: function(){SetIframe_height();},
        pageSize:100,
        usePagerOnLessPagesize: false,
        root: 'rows',
        record: 'total',
        hideLoadButton: true,
        width: '100%',
        height: 300,
        heightDiff: -2,
        fixedCellHeight:false,
        enabledEdit: true,
        isScroll: false,
        checkbox: false,
        rownumbers: true,
        allowUnSelectRow: true,
        alternatingRow: false
    });
}


//初始化农机产品列表数据--farm
function initFarmList(){
	if(!_projectId)return;
	$("#farm0").show();
	farmGrid = $("#ligergrid_fee_farm").ligerGrid({
        url: '<%=path%>/project/audit/initPrjPrdList.do',
        method: 'get',
        parms:{
        	prjId:_projectId,
        	proIntId:_proIntId,
        	audPrjPrdListFlag:AuditConstant.AUD_PRJ_PRD_LIST_PARAM_FOR_FARM
        },
        columns: [
            {display: '设备大类', name: 'equCategoryCd', minWidth: 80,
                editor: {
                    type: 'select',
                    data: farmEquCategoryCdListJSON,
                    valueField: 'key',
                    textField: 'value'
                },
                valueField: 'equCategoryCd',
                textField: 'equCategoryCdNm',
                render: function (item) {
                    return item.equCategoryCdNm;
                }
            },
            {display: '厂商', minWidth: 80,align:'left',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toMfrDetail(';
                        h+="'"+rowdata.mfrId+"'";
                        //h+=",'ligergrid_bankacc'";
                        if(StringUtils.isNotEmpty(rowdata.mfrNm)){
	                        h+=')">'+rowdata.mfrNm+'</a>'
                        }else{
	                        h+=')"></a>'
                        }
                    return h;
            	}	
            },
            {display: '供应商', minWidth: 80,align:'left',
            	render: function (rowdata, rowindex, value){
           			var h='<a href="javascript:toSplDetail(';
                        h+="'"+rowdata.splId+"'";
                        //h+=",'ligergrid_bankacc'";
                        if(StringUtils.isNotEmpty(rowdata.splNm)){
	                        h+=')">'+rowdata.splNm+'</a>'
                        }else{
	                        h+=')"></a>'
                        }
                    return h;
            	}	
            },
            {display: '设备名',align:'left', name: 'prdNm', minWidth: 80 },
            {display: '车辆型号', name: 'prdMdl', minWidth: 80 },
            {display: '是否新车', name: 'isNewNm', minWidth: 50 },
            {display: '使用期限(月)',align:'right', name: 'usedPd', minWidth: 50 },
            {display: '单价',align:'right', name: 'guidePc', minWidth: 80 },
            {display: '数量',align:'right', name: 'prdQty', minWidth: 50 },
            {display: '小计',align:'right', name: 'prdAmt', minWidth: 80 },
            {display: '留购价',align:'right', name: 'purchaseFeeAmtSum', minWidth: 80 },
            {
                display: '提车日期', name: 'audCarInfoVO.pickDate',
                editor: {type: 'date'},
                render: function (rowdata, index, value) {
                    var result = '';
                    if (value == '') return result;
                    var date = new Date(value);
                    result = date.Format('yyyy-MM-dd');
                    return result;
                }
            },
            {display: '首付款缴纳情况', name: 'audCarInfoVO.firstPaymentInfo', minWidth: 50, editor: {type: 'text'} },
            {display: '设备权益', name: 'audCarInfoVO.equipmentRights', minWidth: 50, editor: {type: 'text'} },
            ],
        onBeforeSubmitEdit: function (e) {
        	//alert("onbeforeSubmit");
        },
        onBeforeEdit: function (e) {
            //alert("obeforeEdit");
            //确认修改收益率 --> 保存
        },
        onAfterShowData:function (data){
        	SetIframe_height();
        },
        pageSize:100,
        usePagerOnLessPagesize: false,
        root: 'rows',
        record: 'total',
        hideLoadButton: true,
        width: '100%',
        height: 300,
        heightDiff: -2,
        enabledEdit: true,
        isScroll: false,
        checkbox: false,
        rownumbers: true,
        allowUnSelectRow: true,
        alternatingRow: false
    });
}

function toCorePrcBookAdd(_prjPrdId){
    /*top.$.ligerDialog.SQopen({
        width: 700,
        height:300,
        title : '核价基础台账',
        url:'<%=path%>/audit/audStandingBook/toCorePrcBookAddPage.do?prjPrdId='+_prjPrdId+'&proIntId='+_proIntId+'&projectId='+_projectId,
        buttons: [{
	            text: "提交核价基础台账", type: 'ok', cls: 'l-dialog-btn-ok',
	            onclick: function (item, Dialog) {
	                if (Dialog.onOk) Dialog.onOk();
	            }
	        }, {
	            text: "关闭", type: 'cancel', cls: 'l-dialog-btn-no',
	            onclick: function (item, Dialog) {
	                if (Dialog.onCancel) Dialog.onCancel();
	            }
	        }
	    ]
    });*/
    Add_navTab("corePrcBook"+_prjPrdId, "车辆配置单", '<%=path%>/audit/audStandingBook/toCorePrcBookAddPage.do?buOrgCd=${buOrgCd}&prjPrdId='+_prjPrdId+'&proIntId='+_proIntId+'&projectId='+_projectId+'&isDetail='+isDetail);
}

//提交至信审基础台账
function subAudBscBook(){
	var creditInfoId = $("#creditInfoId").val();
	if(!creditInfoId || creditInfoId==""){
		top.$.ligerDialog.SQalert({content:"请先保存信审整体资料信息.", SQ_type: "warning"});
		return;
	}
	top.$.ligerDialog.SQopen({
		//top:400,
        width: 800,
        height:300,
        title : '信审基础台账',
        url:'<%=path%>/audit/audStandingBook/toAudBscBookAddPage.do?projectId='+_projectId+'&proIntId='+_proIntId+'&prdTypCd='+_prdTypCd+'&taskDefKey='+_taskDefKey+'&taskNm='+_taskNm+'&isDetail='+isDetail,
        buttons: [
<c:if test="${isDetail==0 }">
            {
	            text: "保存", type: 'ok', cls: 'l-dialog-btn-ok',
	            onclick: function (item, Dialog) {
	                if (Dialog.onOk) Dialog.onOk();
	            }
	        }, {
	            text: "关闭", type: 'cancel', cls: 'l-dialog-btn-no',
	            onclick: function (item, Dialog) {
	                if (Dialog.onCancel) Dialog.onCancel();
	            }
	        }
	        </c:if>
	    ]
    });
}

function toCreditPassOpinionAdd(){
    Add_navTab("CreditInfo_2"+_proIntId, "信审通过意见", '<%=path%>/audit/audPrjPassOp/toAddPage.do?projectId='+_projectId+'&proIntId='+_proIntId+'&prdTypCd='+_prdTypCd);
}
function toCreditRejectOpinionAdd(){
	var bookTypCd = AuditConstant.AUD_REJECT_BOOK_TYP_CD;//台账类型-信审驳回台账
	var opinionTypeCd = AuditConstant.SYS_FLOW_REJ_RSN_TYP_CD_PRJ;//驳回意见类型-立项驳回
	top.$.ligerDialog.SQopen({
        width: 900,
        height:500,
        top:200,
        title : '信审驳回意见',
        url:'<%=path%>/audit/audRejectOpinion/toAddPage.do?projectId='+_projectId+'&proIntId='+_proIntId+'&taskId='+_taskId+'&taskDefKey='+_taskDefKey+'&opinionTypeCd='+opinionTypeCd+'&bookTypCd='+bookTypCd+'&taskNm='+_taskNm,
        buttons: [{
	            text: "保存", type: 'ok', cls: 'l-dialog-btn-ok',
	            onclick: function (item, Dialog) {
	                if (Dialog.onOk) Dialog.onOk();
	            }
	        }, {
	            text: "关闭", type: 'cancel', cls: 'l-dialog-btn-no',
	            onclick: function (item, Dialog) {
	                if (Dialog.onCancel) Dialog.onCancel();
	            }
	        }
	    ]
    });
}
//新增/修改
function toAudInterviewAdd(){
	top.$.ligerDialog.SQopen({
        width: 1000,
        height:400,
        title : '面谈信息',
        url:'<%=path%>/audit/audInterviewInfo/toAddPage.do?projectId='+_projectId+'&isDetail='+isDetail,
        buttons: [{
	            text: "保存", type: 'ok', cls: 'l-dialog-btn-ok',
	            onclick: function (item, Dialog) {
	                if (Dialog.onOk) Dialog.onOk();
	            }
	        }, {
	            text: "关闭", type: 'cancel', cls: 'l-dialog-btn-no',
	            onclick: function (item, Dialog) {
	                if (Dialog.onCancel) Dialog.onCancel();
	            }
	        }
	    ]
    });
    //Add_navTab("AudInterview"+_projectId, "修改面谈信息", '<%=path%>/audit/audInterviewInfo/toAddPage.do?projectId='+_projectId+'&isDetail='+isDetail);
}
//新增/修改
function toAudReturnVisitAdd(){
	//重新获取信审整体资料信息
	var callback = function callback() {
		initCreditData();
	}
    Add_navTab("AudReturnVisit"+_projectId, "修改回访记录", '<%=path%>/audit/audReturnVisit/toAddPage.do?buOrgCd=${buOrgCd}&projectId='+_projectId+'&proIntId='+_proIntId+'&prdTypCd='+_prdTypCd,callback);
}
//详情
function toAudReturnVisitDetail(){
    Add_navTab("AudReturnVisit"+_projectId+1, "查看回访记录", '<%=path%>/audit/audReturnVisit/toAddPage.do?buOrgCd=${buOrgCd}&isDetail=1&projectId='+_projectId+'&proIntId='+_proIntId+'&prdTypCd='+_prdTypCd);
}
//资料
function toPrjFileInfo(){
    Add_navTab("addPrjFileInfo"+_projectId, "项目资料", '<%=path%>/project/prjFileInfo/toFileInfoListPage.do?prjId='+_projectId+'&ctrlKey='+ctrlKey);
}

//付款审核
function toPayInfoList(){
    Add_navTab("toPayInfoList"+_projectId, "付款审核", '<%=path%>/capPay/flow/toTempPayInfoList.do?version=${version}&ctrlKey=${ctrlKey}&confirmPay=${confirmPay}&prjId=${projectId}&processInstanceId=${proIntId}&taskId=${taskId}&taskDefKey=${taskDefKey}&taskNm=${taskNm}');
}

//担保人详情
function toGuarantorDetail(_cstId,_cstTypCd){
	if(!_cstId || !_cstTypCd)return;
	if(_cstTypCd == 1){
		Add_navTab('tab_customer_np_detail'+_cstId,'担保人详情','<%=path%>/customer/cstbscinfo/toCustCstBacInfoNpDetailPage.do?id='+_cstId);
	}else if(_cstTypCd == 2){
		Add_navTab('tab_customer_corp_detail'+_cstId,'担保人详情','<%=path%>/customer/cstbscinfo/toCustCstBacInfoCorpDetailPage.do?id='+_cstId);
	}
}
//承租人详情
function showCustomerDetail(_cstId,_cstTypCd){
	var _cstId = $("#cstId").val();
	var _cstTypCd = $("#cstTypCd").val();
	if(!_cstId || !_cstTypCd)return;
	if(_cstTypCd == 1){
		Add_navTab('tab_customer_np_detail'+_cstId,'承租人详情','<%=path%>/customer/cstbscinfo/toCustCstBacInfoNpDetailPage.do?id='+_cstId);
	}else if(_cstTypCd == 2){
		Add_navTab('tab_customer_corp_detail'+_cstId,'承租人详情','<%=path%>/customer/cstbscinfo/toCustCstBacInfoCorpDetailPage.do?id='+_cstId);
	}
}
//挂靠公司详情
function toGuaKaoDetail(){
	var _cstId = $("#cstId").val();
	var _cstTypCd = $("#cstTypCd").val();
	if(StringUtils.isNotEmpty(_projectId)){
		Add_navTab('tab_customer_corp_detail'+_projectId,'项目产品明细',"<%=path%>/project/prjprddtl/toPrjPrdDtlListPage.do?prjId="+_projectId+"&&detailFlag="+true+"&cstId="+_cstId+"&cstTypCd="+_cstTypCd);
	}
}

function showCredit(){
	var flag = '${flag}';
	if(flag==0){
	    Add_navTab("showCredit"+_projectId, "征信查询", '<%=path%>/riskctrl/rskctrlcp/toMainPage.do?flag=${flag }&id=${projectId}');
	}else if(flag==1){
	    Add_navTab("showCredit"+_projectId, "征信复议", '<%=path%>/riskctrl/rskctrlcp/toMainPage.do?flag=${flag }&id=${projectId}');
	}
	
}
function showCreditPrepositionByCertNo(){
	if(_certNo){
	    Add_navTab("showCreditPreposition"+_certNo, "征信前置查询", '<%=path%>/riskctrl/rccstbscinfo/toBfRecListPage.do?certNo='+_certNo);
	}
}

function saveCstLvlCd(){
	var _cstLvlCd = $("#cstLvlCd").val();
	if(!_cstLvlCd || _cstLvlCd==" "){
		top.$.ligerDialog.SQalert({content: "客户等级不能为空.", SQ_type: "warning"});
		return;
	}
	var wait_dialog;
	$.ajax({
		type: 'post',
		dataType:'json',
		data:{
			cstMgrOrgCd:cstMgrOrgCd,
			buOrgCd:buOrgCd,
			cstId:'${cstId}',
			cstLvlCd:_cstLvlCd
		},
		url: '<%=path%>/project/audit/modifyCstLvlCd.do',
		beforeSend: function(){
	          wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
	     },
		success:function(msg){
			 wait_dialog.close();
			 if(msg.success == 1){
				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "success"});
			 }else{
				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
			 }
		}
	});
}

//禁用页面固定字段
function disableFixedFiled(){
	disabledRgnProvCd();//禁用区域
	/* liger.get("driverInfo").setDisabled(true);
	liger.get("startplace").setDisabled(true);
	liger.get("destination").setDisabled(true); */
	
	$("#selfTkDesc").setDisabled_ligerTextarea(true);
	/* if(liger.get("selfTkDesc")){
		liger.get("selfTkDesc").setDisabled(true);
	} */
	if(liger.get("profitCd")){
		liger.get("profitCd").setDisabled(true);
	}
	if(liger.get("experience")){
		liger.get("experience").setDisabled(true);
	}
	if(liger.get("mainGoodsCd")){
		liger.get("mainGoodsCd").setDisabled(true);
	}
	if(liger.get("goods")){
		liger.get("goods").setDisabled(true);
	}
	$("#route").setDisabled_ligerTextarea(true);
	/* if(liger.get("route")){
		liger.get("route").setDisabled(true);
	} */
	if(liger.get("goodsResCd")){
		liger.get("goodsResCd").setDisabled(true);
	}
	if(liger.get("settlementTypeCd")){
		liger.get("settlementTypeCd").setDisabled(true);
	}
	if(liger.get("driverInfo")){
		liger.get("driverInfo").setDisabled(true);
	}
	if(liger.get("secondPayResCd")){
		liger.get("secondPayResCd").setDisabled(true);
	}
	if(liger.get("isNew")){
		liger.get("isNew").setDisabled(true);
	}
	if(liger.get("processOpinionCd")){
		liger.get("processOpinionCd").setDisabled(true);
	}
	if(liger.get("cstMgrLvlCd")){
		liger.get("cstMgrLvlCd").setDisabled(true);
	}
	if(liger.get("localLiveTmCd")){
		liger.get("localLiveTmCd").setDisabled(true);
	}
	if(liger.get("riskCtrlLvlCd")){
		liger.get("riskCtrlLvlCd").setDisabled(true);
	}
	if(liger.get("firstPayResCd")){
		liger.get("firstPayResCd").setDisabled(true);
	}
	if(liger.get("isMeetPolicyCd")){
		liger.get("isMeetPolicyCd").setDisabled(true);
	}
	if(liger.get("goodsDisp")){
		liger.get("goodsDisp").setDisabled(true);
	}
	/* if(liger.get("otherInfo")){
		liger.get("otherInfo").setDisabled(true);
	} */
	$("#otherInfo").setDisabled_ligerTextarea(true);
	$("#qualificationOpn").setDisabled_ligerTextarea(true);
	$("#infomationOpn").setDisabled_ligerTextarea(true);
	$("#schemeOpn").setDisabled_ligerTextarea(true);
	$("#riskOpn").setDisabled_ligerTextarea(true);
	$("#offLionContract").setDisabled_ligerTextarea(true);
	$("#pbcCreditInfo").setDisabled_ligerTextarea(true);
	$("#tripCreditInfo").setDisabled_ligerTextarea(true);
	$("#ownCreditInfo").setDisabled_ligerTextarea(true);
	/* if(liger.get("qualificationOpn")){
		liger.get("qualificationOpn").setDisabled(true);
	}
	if(liger.get("infomationOpn")){
		liger.get("infomationOpn").setDisabled(true);
	}
	if(liger.get("schemeOpn")){
		liger.get("schemeOpn").setDisabled(true);
	}
	if(liger.get("riskOpn")){
		liger.get("riskOpn").setDisabled(true);
	}
	if(liger.get("offLionContract")){
		liger.get("offLionContract").setDisabled(true);
	} */
	if(liger.get("netIncome")){
		liger.get("netIncome").setDisabled(true);
	}
	if(liger.get("highEasonCharterdBus")){
		liger.get("highEasonCharterdBus").setDisabled(true);
	}
	if(liger.get("peakEasonCharterdBus")){
		liger.get("peakEasonCharterdBus").setDisabled(true);
	}
	if(liger.get("otherFeePct")){
		liger.get("otherFeePct").setDisabled(true);
	}
	if(liger.get("grossIncome")){
		liger.get("grossIncome").setDisabled(true);
	}
}
//禁用信审资料动态字段 刷新动态字段请求完成后调用
function disabledCreditDyncFiled(){
	if(liger.get("tripGoods")){
		liger.get("tripGoods").setDisabled(true);
	}
	if(liger.get("tripGoodsMainCd")){
		liger.get("tripGoodsMainCd").setDisabled(true);
	}
	if(liger.get("tripGoodsSubCd")){
		liger.get("tripGoodsSubCd").setDisabled(true);
	}
	if(liger.get("returnGoods")){
		liger.get("returnGoods").setDisabled(true);
	}
	if(liger.get("returnGoodsMainCd")){
		liger.get("returnGoodsMainCd").setDisabled(true);
	}
	if(liger.get("returnGoodsSubCd")){
		liger.get("returnGoodsSubCd").setDisabled(true);
	}
	if(liger.get("mainGoodsCd")){
		liger.get("mainGoodsCd").setDisabled(true);
	}
	if(liger.get("weight")){
		liger.get("weight").setDisabled(true);
	}
	if(liger.get("fareType")){
		liger.get("fareType").setDisabled(true);
	}
	if(liger.get("returnNum")){
		liger.get("returnNum").setDisabled(true);
	}
	if(liger.get("settlementType")){
		liger.get("settlementType").setDisabled(true);
	}
	if(liger.get("monthIncome")){
		liger.get("monthIncome").setDisabled(true);
	}
	if(liger.get("monthRepayment")){
		liger.get("monthRepayment").setDisabled(true);
	}
	if(liger.get("distance")){
		liger.get("distance").setDisabled(true);
	}
	if(liger.get("experience")){
		liger.get("experience").setDisabled(true);
	}
	if(liger.get("useMainTypeCd")){
		liger.get("useMainTypeCd").setDisabled(true);
	}
	if(liger.get("useSubTypeCd")){
		liger.get("useSubTypeCd").setDisabled(true);
	}
	if(liger.get("passengersCd")){
		liger.get("passengersCd").setDisabled(true);
	}
	if(liger.get("chargingType")){
		liger.get("chargingType").setDisabled(true);
	}
	if(liger.get("monthOutDays")){
		liger.get("monthOutDays").setDisabled(true);
	}
	if(liger.get("workTypeCd")){
		liger.get("workTypeCd").setDisabled(true);
	}
	if(liger.get("industryTypeCd")){
		liger.get("industryTypeCd").setDisabled(true);
	}
	if(liger.get("professionCd")){
		liger.get("professionCd").setDisabled(true);
	}
	if(liger.get("postCd")){
		liger.get("postCd").setDisabled(true);
	}
	if(liger.get("workYeays")){
		liger.get("workYeays").setDisabled(true);
	}
	if(liger.get("income")){
		liger.get("income").setDisabled(true);
	}
	if(liger.get("secondRepayment")){
		liger.get("secondRepayment").setDisabled(true);
	}
	if(liger.get("equipmentUse")){
		liger.get("equipmentUse").setDisabled(true);
	}
	if(liger.get("ownLand")){
		liger.get("ownLand").setDisabled(true);
	}
	if(liger.get("contractLand")){
		liger.get("contractLand").setDisabled(true);
	}
	if(liger.get("contractYeays")){
		liger.get("contractYeays").setDisabled(true);
	}
	if(liger.get("contractPrice")){
		liger.get("contractPrice").setDisabled(true);
	}
	if(liger.get("growCrops")){
		liger.get("growCrops").setDisabled(true);
	}
	if(liger.get("yield")){
		liger.get("yield").setDisabled(true);
	}
	if(liger.get("saleTime")){
		liger.get("saleTime").setDisabled(true);
	}
	if(liger.get("salePrice")){
		liger.get("salePrice").setDisabled(true);
	}
	if(liger.get("grossIncome")){
		liger.get("grossIncome").setDisabled(true);
	}
	if(liger.get("netIncome")){
		liger.get("netIncome").setDisabled(true);
	}
	if(liger.get("workArea")){
		liger.get("workArea").setDisabled(true);
	}
	if(liger.get("workRange")){
		liger.get("workRange").setDisabled(true);
	}
	if(liger.get("workSize")){
		liger.get("workSize").setDisabled(true);
	}
	if(liger.get("workPrice")){
		liger.get("workPrice").setDisabled(true);
	}
	if(liger.get("workIncome")){
		liger.get("workIncome").setDisabled(true);
	}
	if(liger.get("workTime")){
		liger.get("workTime").setDisabled(true);
	}
}

function submitCredit(){
	var wait_dialog;
    $.ajax({
		type: 'post',
		dataType:'json',
		url: '<%=path%>/project/audit/submitCredit.do?prjId=${projectId}',
		beforeSend: function(){
	          wait_dialog=top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
	     },
		success:function(msg){
			 wait_dialog.close();
			 if(msg.success == 1){
				 UIUtils.alertSuccessHold1(msg.info);
				 window.location.reload();
			 }else{
				 UIUtils.alertErrorHold1(msg.info);
			 }
		}
	});
}

function toTripartitePage(){
	if(!_projectId)return;
	Add_navTab("toTripartitePage"+_projectId, "人行征信及三方", '<%=path%>/riskctrl/riskctrlzk/riskCtrlZkMain.do?id='+_projectId);
}
//查询项目信息(查重)
function toRePrjPage(type,value){
	var _cstId = $("#cstId").val();
	var _cstTypCd = $("#cstTypCd").val();
	if(StringUtils.isEmpty(_cstId) || StringUtils.isEmpty(_projectId) || StringUtils.isEmpty(_cstTypCd))return;
	value = $("#"+value).html();
	Add_navTab('tab_re_prj'+'-'+type+_cstId,'查重页面','<%=path%>/project/prjbscinfo/toRePrjListPage.do?id='+_cstId+'&cstTypCd='+_cstTypCd+'&prjId='+_projectId+'&type='+type+'&value='+value);
}
//查询项目信息(查重)
function toRePrjPageList(type,value){
	var _cstId = $("#cstId").val();
	var _cstTypCd = $("#cstTypCd").val();
	if(StringUtils.isEmpty(_cstId) || StringUtils.isEmpty(_projectId) || StringUtils.isEmpty(_cstTypCd))return;
	Add_navTab('tab_re_prj'+'-'+type+_cstId,'查重页面','<%=path%>/project/prjbscinfo/toRePrjListPage.do?id='+_cstId+'&cstTypCd='+_cstTypCd+'&prjId='+_projectId+'&type='+type+'&value='+value);
}
//到项目列表页（与客户经理关联）
function toMgrPrjBscInfoPage(){
	var cstMgrId = $("#cstMgrId").val();
	if(StringUtils.isEmpty(cstMgrId))return;
	Add_navTab('tab_re_mgr_prj','项目列表','<%=path%>/project/prjbscinfo/toPrjBscInfoListPage.do?cstMgrId='+cstMgrId+'&mgrPrjViewFlag=mgrPrjViewFlag');
}

</script>
</body>
</html>